so it has come down to this one line of code... I am basically trying to create a part in my code that says do this if i.e9 but if not do this... here is the code...
('.fa-phone, .bg-darkPink').parent().on('click', function () {
$('.submenu-ctn').fadeTo(0, 0);
<<--IF I.E9 OR BELOW DO THIS THING--->>
$('#menu').multilevelpushmenu({
Collapsed: true
});
<<--END OF I.E9 OR BELOW THING ----->>
<<--I.E9 MUST ALSO IGNORE THIS LINE IN THE SCRIPT --->>
$( '#menu' ).multilevelpushmenu( 'collapse' );
$MORE CODE
$MORE CODE
it is part of a string of functions associated with a button.. for some reason i.e9 didn't like the function but the other way it did.. any help here would be awesome ...
p.s I am using modernizr 2.6.2 so have been reading up on its feature detection capabilities but can't get my head round it , please someone put me out of my misery ;p
beggining of solution EDIT
So far I have this ...
$('.fa-phone, .bg-darkPink').parent().on('click', function () {
$('.submenu-ctn').fadeTo(0, 0);
$('.submenu-ctn').fadeTo(3000, 1);
$("#colorscreen").remove();
$("body").append('<div id="colorscreen" class="animated"></div>');
$("#colorscreen").addClass("fadeInUpBigCS");
$(".tile-area-main").css({width: "720px",opacity:1}).load("contact-page.html #contact-form");
$.getScript("js/slider/slider-animations.js");
$(".submenu-ctn").load("contact-page.html .submenu-contact");
$('.nav-toggle').removeClass('active');
$(this).addClass('active');
if(browser.name=='msie'&&browser.version<=9) {
$('#menu').multilevelpushmenu({Collapsed: true});
}else {
$( '#menu' ).multilevelpushmenu( 'collapse' ); }
});
You can use conditional comments in html:
Update:
You can use navigator object in Script to detect if it is ie9 or below.
It return this:
example:
Check the following link
Here is the code:
Now check in you function if flag is true call the function else jump through
Update 3:
Try this code