I have a collection of links with thumbnails that match them. I need to load these thumbnails as divs with the background image set to them. I\'m using a single image that has a
Hiya Working demo here: http://jsfiddle.net/f6FJ3/19/
for the trigger reason read this : jQuery: trigger click() doesn't work?
It's important to clarify that doing jQuery('#open').click() does not execute the href attribute of an anchor tag so you will not be redirected. It executes the onclick event for #open which is not defined.
below code will get the desired output of window getting open on image click.
JQuery Code
$(document).ready(function(){
$('.tmb').click(function(){
var target=$(this).parent().find("a");
$("#debug").text("clicked "+target.text());
//target.triggerHandler('click');
window.open(target.attr('href'));
});
});
Hope this helps, cheers!