in jquery, how to make the right click of the mouse have the same behavior of left click -


&lta id="link1" href="link1"&gtlink1&lt/a&gt

what want realize: when right click or left click these link, both go linked pages. have several questions:

  1. how can href jquery in firefox , ie?

  2. how can identify mouse event in firefox , ie, event.which has different behaivors in firefox , in ie

thank much

to href, attribute of a tag, can use

var the_href = $('#link1').attr('href'); 

this works on major browsers.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -