开发者

jQuery loading a url when a thumb loads

Let's say I have a mini app that consists of title, thumb, lg_image, url fields. I am loading in these thumbs dynamically by looping over the queryset. Each record has a url in the url field, how would I go about making the lg_image clickable to go to that url field? if it's any help I am using http://coffeescripter.com/code/ad-gallery/ and basically I need the larger image to navigate to a u开发者_开发知识库rl provided. I hope this is clear, it was a tad tough to explain. Please advise if not.

Thanks

  • JeffC


It looks like that plugin uses a custom attribute longdesc to make the main image clickable. I don't really like how it's not using a <a> tag but if you are trying to make it work for this, give your image tag an attribute of longdesc with a link. Look at the source of the link you provided and also read the comments in the plugin page, people are talking about this very issue.

<img src="http://coffeescripter.com/code/ad-gallery/images/thumbs/t1.jpg" title="A title for 1.jpg" longdesc="http://coffeescripter.com/" alt="This is a nice, and incredibly descriptive, description of the image 1.jpg" class="image0"> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜