Fixing target=”_blank” for W3C compliance using Javascript / jQuery

HTML 4.0 Strict and XHTML 1.0 Strict recommendations of the W3C no longer include the target attribute of the <a> tag. The Transitional versions of the specifications still include it, but by definition, these specs are on the way out. So this means you can’t use target=”_blank” for your <a> tags if you want to …

Read more

How to use jQuery Lightboxes Extension for Cms pages/static blocks?

Introduction: There is no doubt that jQuery Lightboxes is one of the best jQuery lightbox extension for Magento’s media gallery(base image & more views). This extension comes with a collection of jQuery lightboxes in one pack: Fancybox, Pirobox & Lightbox clone & many more features. Features: Upgrade proof Module. Checked for Magento Versions 1.3.x – …

Read more

Reset form using jQuery

One thing to be noted that pre-filled form values do not get reset using the html reset button. In this case, javascript becomes handy. It’s again even much easier to reset using JQuery. Here is the solution: function resetForm(id) { $(‘:input’,’#’+id) .not(‘:button, :submit, :reset, :hidden’) .val(”) .removeAttr(‘checked’) .removeAttr(‘selected’); } <input type=”button” onclick=”resetForm(‘formId’);” value=”Reset” /> Where …

Read more