Jump to content

rightClick


codingmasterRS

Recommended Posts

Hi guys,

I have now sorted out the right click by using http://abeautifulsite.net/blog/2008/05/jquery-right-click-plugin/

 

and have this code

$(document).ready( function() {
$("#imgone").rightClick( function(e) {
	alert('Initiate');
});
});

 

however I need it to only do the IM if the <img> has class online applied to it.

 

Now someone suggested

$(document).ready( function() {
$("#img.online").rightClick( function(e) {
	alert('Initiate');
});
});

 

but that does NOT work, so if anyone know how I can make this work it would be much appreciated.

 

PS/ It needs to be a class becuase I will use jQuery addClass

 

Link to comment
https://forums.phpfreaks.com/topic/239125-rightclick/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.