Maybe something like this:
$('a').each(function()
{
var self = this;
var btn_link = $('a href=#'+$(self).text()+'/a');
var href = $(self).attr('href'); // to be used in modal code
$(btn_link).click(function()
{
// set up your modal
You can simplify your approach; it's not necessary to copy the
properties to the new link as you can just get them at runtime when
the link is clicked (you also don't need to iterate over all the
anchors):
$('a href=/modalwindow.htmlimg src=/images/button.jpg//
a').click(function(){
var
2 matches
Mail list logo