javascript - else if statement with different paremeters -


i making statements site, , can't understand, how make such type of statement. here code

function checkwindowsize() {   var pagewidth = $(window).width();   if (pagewidth < 751) {     $('.tab-content div').removeclass('tab-pane');     $('#mytabs a').removeattr("data-toggle", "tab");   }   else if (pagewidth < 751 && $(window).scrolltop()>=580;) {     $('#faq .col-sm-3').addclass('fixed-faq');     $('.tab-content div').addclass('padd-top');   }   else {     $('#faq .col-sm-3').removeclass('fixed-faq');     $('.tab-content div').removeclass('padd-top');     $('#mytabs a').attr("data-toggle", "tab");     $('.tab-content div').addclass('tab-pane');   }; }; $(window).load(checkwindowsize); $(window).resize(checkwindowsize); 

it works fine checking width , statements if, , else, when try make else if, 2 parameters of check, whole code stop working. can me ?

else if (pagewidth < 751 && $(window).scrolltop()>=580;)  

remove semicolum line. move second else if condition first , first condition second.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -