Some example code for stripping out all non word characters. So only letters, underscores/spaces, and numbers. This would not be good for email sanitization, but could be good for other input fields. var search_term = $(‘.search_tag_input’).val(); // strip tags search_term = search_term.replace(/(<([^>]+)>)/ig,”"); //spaces as underscores search_term = search_term.replace(‘ ‘, ‘_’); //remove nonword characters (and underscores) [...]
tags: Javascript, jQuery, Notes author: admin comments: No Comments
John Resig has an excellent post on his blog about scroll events, efficiancy, and how that recently affected twitter. Below is some example code he wrote for working with scroll events.
tags: Javascript, jQuery, Notes, scrolling author: admin comments: No Comments
Drag the waves.Click the waves to disable mouse rotating. Flip the waves 90 degrees clockwise Flip the waves 90 degrees counter-clockwise Flip the waves 270 degrees clockwise (same as above) Flip the waves 26 degrees clockwise Flip the waves 84 degrees counter-clockwise Flip the waves 108 degrees counter-clockwise Flip the waves 180 degrees either direction [...]
tags: CSS, IE, Javascript, jQuery, Notes, rotation author: admin comments: No Comments
if ($.browser.msie && parseInt($.browser.version)< 7) { //code goes here }
tags: IE, IE6, Javascript, jQuery, Notes author: admin comments: No Comments
This is an easy way to accomplish position:fixed; across all browsers using jQuery. Works in IE6. $(window).scroll(function() { $(‘#elementName’).css(‘top’, $(this).scrollTop() + “px”); });
tags: CSS, Javascript, jQuery, Notes author: admin comments: No Comments
This is going to be a list of web development tools that I use. Right now, it’s pretty small. Inspired by this page from elementiks.com. Templates: Bulletproof Templates – Joomla Blank Skeleton Templates Sandbox by Plaintext – WordPress Blank Skeleton Template jQuery: Visual jQuery jQuery API
tags: CSS, Javascript, Joomla, jQuery, Notes, PHP, Templates author: admin comments: No Comments