Change CSS Class With JavaScript

If we need to change the CSS class of a div or any other element with onclick or onmouseover etc. dynamically using JavaScript, you can do so using className. Follow the below example – Click here to see the class change Mouse over to see the class change

jQuery Useful Links Of Tutorials, Manual, Examples

jQuery with its huge number of plugins is a Javascript framework that can do everything … well, almost everything 😛 So I list below few links that will help people working with jQuery 1. http://jquery14.com/ (14 consecutive days of new releases for jQuery 1.4)2. http://api.jquery.com/visual/ (A jQuery Manual that is helpful and stylish)3. http://jqueryui.com/demos/ (jQuery… Continue reading jQuery Useful Links Of Tutorials, Manual, Examples

Javascript Email Validation With Regular Expression

First lets see the code Now the explanation /^([a-zA-Z0-9_\.\-])+\@+([a-zA-Z0-9\-]{2,})+\.+([a-zA-Z0-9\.]{2,6})$/ ^[a-zA-Z0-9_\.\-] = Matching the beginning of the stringAny character from a-z, A-Z, 0-9 and . – _ \@ = @ [a-zA-Z0-9\-]{2,} = Any character from a-z, A-Z, 0-9 and –Number of characters should be at least 2There are no upper limit on number of characters \.… Continue reading Javascript Email Validation With Regular Expression

Get Selected Index And Option Text With JavaScript

The below example shows how to get the value, selected index, selected text of a drop down with JavaScript. The HTML select is below Select a value First Option Second Option Third Option Fourth Option Now the JavaScript to get the values. Within the firejs function (that is fired with onchange event) the following can… Continue reading Get Selected Index And Option Text With JavaScript

Include Code in Blogger Posts With Syntax Highlighting

If you have tried to post a few lines of code on your Blogger post, you must have faced the problem. The best solution I have found till date is a JavaScript code syntax highlighter. Its written by Alex Gorbatchev and can be found here – http://alexgorbatchev.com/wiki/SyntaxHighlighter And if you cannot upload the js files… Continue reading Include Code in Blogger Posts With Syntax Highlighting

Javascript Visual Effects With Scriptaculous (script.aculo.us)

If you are using Prototype as your javascript framework (even if you are not using it) and want some out of the box user interface effects you can try Scriptaculous (script.aculo.us). It is an add-on for Prototype and is really light and handy. Try out the following links site : http://script.aculo.us/ quick start guide and… Continue reading Javascript Visual Effects With Scriptaculous (script.aculo.us)