[jQuery] clashing link & div ID's?
Hi All,
I have a bunch of links that I need to assign ID's to automatically
through php.
However, some of these ID's are already taken by some divs so are
causing conflicts.
I am thinking of adding _link to these new link ID's, so they now
have an ID like divid_link
I want to hide the corresponding div when the link is clicked, so I
need to know how to remove the _link from the end of the link id.
any ideas on how I would shorten the $('#divid_link') below to just $
('#divid') ?
Thanks, Daithi.
$('#divid_link').click(function() {
$('#divid').hide();
});