News & Articles - Quizzes
snow2011test
Thursday 15 December 2011
jQuery.fn.equalHeight = function () { var height = 0; var maxHeight = 0; // Store the tallest element's height this.each(function () { height = jQuery(this).outerHeight(); maxHeight = (height > maxHeight) ? height : maxHeight; }); // Set element's min-height to tallest element's height return this.each(function () { var t = jQuery(this); var minHeight = maxHeight - (t.outerHeight() - t.height()); var property = jQuery.browser.msie && jQuery.browser.version < 7 ? 'height' : 'min-height'; t.css(property, minHeight + 'px'); }); }; jQuery(document).ready(function($) { $('a').each(function() { if(this.href.length > 0) { var a = new RegExp('/' + window.location.host + '/'); if(!a.test(this.href)) { $(this).click(function(event) { event.preventDefault(); event.stopPropagation(); window.open(this.href, '_blank'); }); } } }); $(".SSpromo_2g .copy").equalHeight(); $(".SSpromo_3g .copy").equalHeight(); });