codingmasterRS Posted June 12, 2011 Share Posted June 12, 2011 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 More sharing options...
Alex Posted June 12, 2011 Share Posted June 12, 2011 The selector should be img.online not #img.online. Link to comment https://forums.phpfreaks.com/topic/239125-rightclick/#findComment-1228623 Share on other sites More sharing options...
codingmasterRS Posted June 12, 2011 Author Share Posted June 12, 2011 figured that out thats why I already set the this as TOPIC SOLVED Link to comment https://forums.phpfreaks.com/topic/239125-rightclick/#findComment-1228637 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.