Koodi: Valitse kaikki
<script type="text/javascript">
$(document).ready(function() {
$("a[rel=galleria]").fancybox({
'transitionIn' : 'none',
'transitionOut' : 'none',
'titlePosition' : 'over',
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + currentArray.length + (title.length ? ' ' + title : '') + '</span>';
}
});
});
</script>
Tuolla fancyboxin pääsivulla ei kuitenkaan lähdekoodista löydy (document).ready kohtaa ollenkaan. (Eikä samaa herjaustakaan tule.) Saako sen siis jonnekin "näkymättömiin"? Jos, niin miten? Ja minne?Line 22, Column 44: document type does not allow element "span" here
…return '<span id="fancybox-title-over">Image ' + (currentIndex + 1) + ' / ' + …
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
Toinen ongelma koskee noita kuvagallerioita. Sivulla kun on useampi erillinen galleria (1,2,3...jne.), jotka haluan avautumaan erikseen, niin kuinka saan niputettua ne? Ettei tarvitse laittaa niitä gallerioita useampaan kertaan samoilla speckseillä(document).readyn sisään. Mahdollisimman lyhyttä koodia siis... Koitin kyllä yhdistellä niitä heikolla menestyksellä...
Jos joku ei kysymyksestä vielä tajunnut niin en osaa/hallitse jqueryä ollenkaan...

Kiitos ja anteeksi jo etukäteen, jos joku viitsii vaivautua.