Month: March 2016

IE detect ie version using normal html hack script

In below snippet we can check easily internet explorer version. Using this script add new external style and external javascript.

<p class="accent">
<!--[if IE]>
According to the conditional comment this is IE<br />
<![endif]-->
<!--[if IE 6]>
According to the conditional comment this is IE 6<br />
<![endif]-->
<!--[if IE 7]>
According to the conditional comment this is IE 7<br />
<![endif]-->
<!--[if IE 8]>
According to the conditional comment this is IE 8<br />
<![endif]-->
<!--[if IE 9]>
According to the conditional comment this is IE 9<br />
<![endif]-->
<!--[if gte IE 8]>
According to the conditional comment this is IE 8 or higher<br />
<![endif]-->
<!--[if lt IE 9]>
According to the conditional comment this is IE lower than 9<br />
<![endif]-->
<!--[if lte IE 7]>
According to the conditional comment this is IE lower or equal to 7<br />
<![endif]-->
<!--[if gt IE 6]>
According to the conditional comment this is IE greater than 6<br />
<![endif]-->
<!--[if !IE]> -->
According to the conditional comment this is not IE 5-9<br />
<!-- <![endif]-->
</p>

jQuery first click disable

First click disable in all devise.

jQuery(".subnav a").one("click", false);

First click disable in Mobile devise.

jQuery( document ).ready( function( $ ) {
var isMobile = /iPad|iPhone|Android|iPod/i.test(navigator.userAgent);
	//alert (isMobile);
if (isMobile) {
	
	jQuery(".home-product a, .cart-product a").click(function(e){
		e.preventDefault();
		jQuery(".home-product a").addClass('nav_returnlink');
		jQuery(this).unbind('click');
		//don't actually need to do anything, just want the handler so that css fires in iOS
	});
});