Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from jackfranklin/master

Tidied up the "If" logic
  • Loading branch information...
commit 3889b6950e2ea1801ac45666bfef515c17610b22 2 parents e967fad + f29117f
@mattkersley authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 jquery.mobilemenu.js
View
10 jquery.mobilemenu.js
@@ -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);
}
@@ -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);
}
}
@@ -147,4 +147,4 @@
};
-})(jQuery);
+})(jQuery);
Please sign in to comment.
Something went wrong with that request. Please try again.