English 中文(简体)
如何获得<a href>具体类别的内容?
原标题:How to get <a href> elements with specific class?

我试图将某些具体职能与具有“MySpecialClass”类的具体联系联系起来。 例:

<a href="#" class="aMySpecialClass"></a>

我尝试了以下法典的若干改动,没有。

jQuery( a ).find( .aMySpecialClass ).live(
     click ,
    function(event) {
        jQuery.fn.myfunction(this);
    });

能否找到所有使用j Query(a)的方法?

编辑:注意到,这些链接和班级是常年界定的,在网页准备好后,这些链接和班级是动态生成的,向服务器发送了问询,结果之后与特定班级建立了联系。

问题回答

您是否尝试了<条码>j Query(aMySpecialClass )?

为此:

$( a.aMySpecialClass ).live(
     click ,
    function(event) {
        jQuery.fn.myfunction(this);
});

如果您使用<条码>,即限值/代码> 您将研究有关内容inside。 仅选择对标签和等级:

jQuery( a.aMySpecialClass )




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!