Last active
August 29, 2015 14:02
-
-
Save jonathanread/a2e5c631b24b8c02cf9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isMobile() { | |
if (window.matchMedia("not all, not all, only screen and (-webkit-min-device-pixel-ratio: 2), not all, only screen and (max-width: 320px) and (min-width: 240px), only screen and (max-width: 480px) and (min-width: 320px), only screen and (max-width: 960px) and (min-width: 480px)").matches) { | |
$(".sfNavHorizontalDropDown").ready(function () { | |
var menu = $(".sfNavHorizontalDropDown").data("kendoMenu"); | |
menu.bind("close", function (e) { | |
$(e.item).children("a").attr("href", "javascript:void(0)"); | |
}); | |
menu.bind("open", function (e) { | |
var a = $(e.item).children("a"); | |
if (a.data("url") !== "") { | |
a.attr("href", a.data("url").replace("~", "")); | |
} | |
}); | |
}); | |
return true; | |
} | |
else { | |
$(".sfNavHorizontalDropDown > li").each(function () { | |
var a = $(this).children("a"); | |
if (a.data("url") != "") { | |
a.attr("href", a.data("url").replace("~", "")); | |
} | |
}); | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment