HTML5 New Elements tutorials

Welcome to HTML5 New Elements tutorials blog, This blog is all about HTML5 new elements for better structure. HTML5 new elements for better structure 1. <article> element: a straddles an article, which is intended to be an independently distributable document, like an article in a magazine.Here are this element’s attributes:   . accesskey . class . contenteditable . […]

jquery – Equal Height Columns

Using jQuery, you can easily equalize the heights of any group of elements.  Below code will equalize all div height which has class= eqheight Code: <script type=”text/javascript”> $(function() { var maxHeight = 0; $(‘div.eqheight’).each(function(){ if (maxHeight < $(this).height()) {maxHeight = $(this).height()} }); $(‘div.eqheight’).each(function(){ $(this).height(maxHeight); }); });

jQuery – check whether an element in the DOM is hidden/Visible

jQuery makes easy to determine if an element is visible or hidden with .is() function or you can use the “hidden” and “visible” selectors. HTML: Hello World! Script: HTML: Script: if ($(‘#myId:visible’).length > 0) console.log(‘the element is visible’); else console.log(‘the element is not visible’); ——–or —– if( $(‘#myDiv’).is(‘:visible’)) { // it’s visible, do something } […]