Hello guys,
I am writing a Greasmonkey script and I need little help here. So I have this code:

$(document).ready (get);

function get ()
                var elems =$( "a[id*='myId.']" );
                                    if (elems.length>0) {

the point is that there are a lot of a tags with id myId.N where N is different number. But that click just doesn't work. Any ideas?


Just use same class name for all a tag which have myId.N

But I want the a tags to be clicked and the trigger doesnt work. This is the problem. I think...

simple , try this

    var id = jQuery(this).attr("id");
    //now you have id of clicked tag.

    alert($('#' + id).length());