English 中文(简体)
具体目标是 j中lt子的图像可消除超级链接
原标题:Target an image by alt tag in jQuery to disable hyperlink
  • 时间:2011-11-11 13:53:35
  •  标签:
  • jquery

I m试图瞄准其带的标签,以扭转自动产生的超链接,这种超链接是服务器方面的,我可以 t。

The code I m using is:

$( .ssImage a[title="test image"] ).click(function(){return false;});

哪些是工作。

传真:

<div class="ssImage"><a href="/content/test.htm" title="test image"><img src="/content/test.jpg" alt="test image"/></a></div>

我可以把四舍五入为目标,因为四舍五入会影响到同一页上的其他图像,因此,我需要找到一种办法,通过斜体或标题来说明图像。

Thank you to anyone who can help!

最佳回答

我认为,选择人正在做罚款,而是打上了<代码>return不实;,这并不妨碍点击。 为此:

$( .ssImage a[title="test image"] ).click(function(e){ 
    e.preventDefault(); 
});
问题回答




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签