开发者

How do you link to an image on a page using jQuery Mobile?

开发者 https://www.devze.com 2023-04-06 04:09 出处:网络
I have a page with a normal link to an image. When jQuery Mobile is loaded and you click on the link, all that is returned is \'undefined\'.

I have a page with a normal link to an image. When jQuery Mobile is loaded and you click on the link, all that is returned is 'undefined'.

How can you link to an image and have the image loaded when clicked?

edit: It's just a normal link with an image:

&开发者_开发问答lt;a href="picture.jpg" class="image"><img src="picture_thumbnail.jpg" /></a>


Seems to work when adding rel="external" to the <a> tag.

<a href="picture.jpg" class="image" rel="external">
  <img src="picture_thumbnail.jpg" />
</a>
0

精彩评论

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