Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from jackfranklin/master
Browse files Browse the repository at this point in the history
Tidied up the "If" logic
  • Loading branch information
mattkersley committed Aug 14, 2011
2 parents e967fad + f29117f commit 3889b69
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jquery.mobilemenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

//function to check if selector matches a list
function isList($this){
return (($this.is('ul, ol')) ? true : false);
return $this.is('ul, ol');
}


//function to decide if mobile or not
function isMobile(){
return (($(window).width() < settings.switchWidth) ? true : false);
return ($(window).width() < settings.switchWidth);
}


Expand All @@ -31,14 +31,14 @@

//if the list has an ID, use it to give the menu an ID
if($this.attr('id')){
return (($('#mobileMenu_'+$this.attr('id')).length > 0) ? true : false);
return ($('#mobileMenu_'+$this.attr('id')).length > 0);
}

//otherwise, give the list and select elements a generated ID
else {
menuCount++;
$this.attr('id', 'mm'+menuCount);
return (($('#mobileMenu_mm'+menuCount).length > 0) ? true : false);
return ($('#mobileMenu_mm'+menuCount).length > 0);
}
}

Expand Down Expand Up @@ -147,4 +147,4 @@

};

})(jQuery);
})(jQuery);

0 comments on commit 3889b69

Please sign in to comment.