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 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? 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/ 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. Link to comment https://forums.phpfreaks.com/topic/264245-jquery-if-structure/#findComment-1354395 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.