[jQuery] jq.slideviewer.plugin (it's a plugin? i'm not sure)
Hi all.
I wanted to write my first plugin and challenge myself with the jq
syntax.
I ended up with something that is like a component (it should be, but
i would
appreciate your suggestions and help) of an image gallery. It is a new
widget!? i know there
are thousands of image sliders, but at last it is something not too
complicated to start with.
I have to say that i'm not a programmer, despite my efforts ;-)
That was the intent:
Create an horizontal image gallery starting by an unordered list only,
and draw automatically an 'interface' (merely a list of links) to move
the picts.
The markup IS:
<ul>
<li><img alt="abc defrg thysu ooip jkifbtg fff"
src="ts/200473460-001.jpg" /></li>
<li><img alt="abc defrg thysu ooip jkifbtg fff"
src="ts/200473462-001.jpg" /></li>
<li><img alt="abc defrg thysu ooip jkifbtg fff"
src="ts/200497153-001.jpg" /></li>
<!--eccetera-->
</ul>
The result is:
http://www.gcmingati.net/wordpress/wp-content/lab/jquery/imagestrip/imageslide-plugin.html
Now with the part where i NEED your help:
1) it works as a plugin infact $("div#mygalone").slideView() makes my
gallery. Are we sure of that? Is it a plugin?
2) WHY i could only create ONE gallery within a page? Something
related to each() i'm missing?
3) How do I say to jquery "wait for THAT image to be fully downloaded
and THEN get its WIDTH?" Sure you'll have to RELOAD the page the first
time you load that gallery: I assigned a width dinamically to the
gallery "mask" and that value is the same value of the width of the
first image. But the image may be slow to load and such "inline
styling" of the MASK fails.
4) The syntax i used in the script seems very basic and redundant to
me. Is there a more elegant way to collect the parameters i collect at
the beginning of the script?