klepec Posted June 15, 2012 Share Posted June 15, 2012 Can you use THIS selectors within if statements? I dont really understand where it can be used. Example: if($('#wanted').length!=0) { $(this).fadeOut(); } Thanks Quote Link to comment https://forums.phpfreaks.com/topic/264245-jquery-if-structure/ Share on other sites More sharing options...
trq Posted June 16, 2012 Share Posted June 16, 2012 Of course you can. Did you try it? Quote Link to comment https://forums.phpfreaks.com/topic/264245-jquery-if-structure/#findComment-1354294 Share on other sites More sharing options...
klepec Posted June 16, 2012 Author Share Posted June 16, 2012 Yes, but this sample doesnt work. Can you explain where it can be used? Here is jsfiddle: http://jsfiddle.net/eLQ8w/1/ Quote Link to comment https://forums.phpfreaks.com/topic/264245-jquery-if-structure/#findComment-1354387 Share on other sites More sharing options...
trq Posted June 16, 2012 Share Posted June 16, 2012 You haven't loaded jQuery into that jsfiddle page. Quote Link to comment https://forums.phpfreaks.com/topic/264245-jquery-if-structure/#findComment-1354395 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.