Hello,
I have the following problem
Is it possible to trigger a link, because this does not seem to work.
The img picture has an atribute rel that contains the id of the link. Clicking on the picture should trigger the link if possible.
I think it is because I capture a jquery click event and not the native link action
anyway, here is the code for you to see
$("#contentmenu li a").click(function(e){
switch(e.target.id){
case "opt1":
alert('do something');
break;
case "opt2":
alert('do something');
break;
case "opt3":
alert('do something');
break;
}
//return false;
});
$("#box_content img").click(function(e){
menuItem=$(this).attr('rel');
$('#'+menuItem).trigger('click');
//return false;
});
EDIT BECAUSE
I found my answer,- it is not possible to trigger the native event off a link so I will use window.location instead
thanks, Richard