[Javascript] Search Box to Show Default Text on Load and Cleared When Focused

Post Thumbnail of [Javascript] Search Box to Show Default Text on Load and Cleared When Focused

Very often we want our search box to show a default text such as “Search…” when it is loaded. Then when users clicked on the search box, the word is cleared, allowing user to enter their search query. We will see how to do that in this short guide in both plain Javascript and jQuery.

Filed in Web Development
Posted on 9 July 2012 • 1 comment

Implementing OnChange and OnKeyUp Event Using jQuery (Select Box)

Post Thumbnail of Implementing OnChange and OnKeyUp Event Using jQuery (Select Box)

Of course there is nothing wrong if you implement onChange event using the traditional way, that is by adding onchange=”" attribute to the HTML element. However, your codes can be better in some ways if you do it using jQuery.

Filed in Web Development
Posted on 21 March 2011 • 3 comments

Get Current Opacity in MSIE using jQuery (Cross Browser Codes)

Post Thumbnail of Get Current Opacity in MSIE using jQuery (Cross Browser Codes)

When I was developing theme, I found a weird problem in IE8. This is the case: I have a DIV that has opacity of 0.4. When I use $(elem).css(‘opacity’) to get its current opacity, it works fine in all browser except IE8, which return opacity of 1.

Filed in Web Development
Posted on 27 January 2011 • 3 comments

jQuery : How To Fix the “$ is not a function” Error Using noConflict

Post Thumbnail of jQuery : How To Fix the "$ is not a function" Error Using noConflict

If you tested your page using FireBug in Firefox and found the error "$ is not a function" or "$ is not defined", most likely you are using other libraries in your page. Libraries that conflicts with jQuery includes MooTools, Prototype, etc.

Filed in Web Development
Posted on 30 October 2009 • 15 comments

Fail-Proof Method to load jQuery Library via Google AJAX Libraries API

Post Thumbnail of Fail-Proof Method to load jQuery Library via Google AJAX Libraries API

I used to load jQuery library via Google AJAX Libraries API to save my bandwidth. It works in all browsers at the beginning, including Internet Explorer. However, it suddenly failed to load in Internet Explorer 6 since last week (error message tells me that jQuery is not loaded at all).

Filed in Web Development
Posted on 21 October 2009 • 2 comments

ZenTabs – A jQuery Tabbed Menu Script

Post Thumbnail of ZenTabs - A jQuery Tabbed Menu Script

If you noticed my tweet, I started to learn jQuery few days ago because I need it to create a photoblogging theme. To test my understanding I need to try making something, so this is the outcome : a tabbed menu script.

Filed in Tools & Scripts
Posted on 29 September 2009 • 13 comments