[thelist] jquery clickable slider

DAVOUD TOHIDY dtohidy at hotmail.com
Sun Jun 5 09:27:18 CDT 2011


Thanks for replying Barney.  Since I have provided the link for scroller that is why
I did not provide all the code. Sorry about that.  but here it is the code at:

http://jsfiddle.net/DHmcG/

I have added the cursor:pointer and the code for click function as provided before.

Thanks
davoud 





> From: barney.carroll at gmail.com
> Date: Sun, 5 Jun 2011 13:04:32 +0100
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] jquery clickable slider
> 
> Davoud,
> 
> Either you're not providing nearly enough information, or I've misunderstood
> something fundamental. Usually with "I don't know what I'm doing wrong"
> questions the best thing is to provide a URL, either where the actual code
> is, or one created by jsfiddle.net.
> 
> On 4 June 2011 15:55, DAVOUD TOHIDY <dtohidy at hotmail.com> wrote:
> >
> > I would like to add urls to the images of scroller.
> 
> I presume you mean you would like to wrap the images in links (<a/>) with
> HREF values. Why can't you do this in the HTML? It doesn't sound like
> Javascript is necessary from the outset.
> 
> 
> I thought having a for loop and array would work which did not.
> >
> If you provide us with the array & loop we might be able to tell you why it
> isn't working — as long as you can explain what it was trying to do
> 
> 
> $('#slider').click(function(){
> >
> > window.location.href = "$('a').each('href')";
> >
> >                });
> >
> > it does return: not found  .../$('a').each('href')
> >
> 
> The code above is saying that whenever your slider object is clicked, the
> page should be redirected to the URL "$('a').each('href')". The quotes (")
> in this mean that it is not to be interpreted as Javascript and instead
> delivered as plain text — which I can tell isn't your intention. Taking the
> quotes off reveals invalid jQuery code which appears ill thought out.
> However when I try to image what you did intend, I come up with something
> like this:
> 
> $('#slider a').click(function(){
> window.location.href = this.href
> })
> 
> …but this is utterly pointless since a link click directing towards its HREF
> is entirely standard behaviour (which jQuery ScrollTo does not override).
> Try removing this code entirely. Is it working now?
> 
> 
> Regards,
> Barney
> -- 
> 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
> 
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt ! 
 		 	   		  


More information about the thelist mailing list