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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.