JQuery Tutorials, Tips & Tricks
Quick fix for JQuery window height issue. Jquery sometime shows incorrect height for $(window). This is fix to correct that bug.
JQuery provides powerful API to manage triggering of events. It provides a way to trigger the event handlers bound to an element without any user interaction via the .trigger() method.
The .on() method (previously known as .live()) is a great way to add custom handlers to different browser events. When such events are triggered, these custom handlers ...
A webpage load time plays a very crucial role in SEO and impacts your website ranking significantly. Google has already incorporated site speed
as one of the several signals that it uses to determine search ranking. The faster your website loads the better it will perform in google ranking.
There are several things one can do ...
It's been a while since I wrote about JQuery. I am spending most of my time these days on backend technologies. Recently while working on a typical requirement on UI, I had to play with some tricky JQuery selectors.
Typically, most of the times we uses JQuery's class selectors or id selectors for example:
But recently I had a requirement where I had to ...
While doing some UI changes of a website, we had to implement a FIX header which remains fix on top of screen while scrolling. Facebook has a similar header which remains on top of content.
Now for this, there are number of jQuery plugins available out there! But in our case we weren't allowed to add any new plugins to the technology stack of application ...
Recently I came across a wonderful article by David Walsh on Clearable Textboxes with Dojo Toolkit . This is a simple implementation where a clear button (x) added in a textbox which lets user to clear the content of the textbox. I have seen this simple feature in many websites and feel its very ...
While writing code in jQuery, I often use .text() method to get the content of any element from DOM. This function is straight forward, it strips off all the html element from a selected element and returns the remaining text.
So for below element the .text() method will return "A quick brown fox".
A quick brown fox
Update: The plugin is now on GitHub: https://github.com/viralpatel/jquery.shorten
Facebook user updates has a great functionality. If the comment text is larger than few characters, the extra words are hide and a show more link is presented to user. This way you can keep long text out of the view to user and stop the ...
Since few days I am working on a small project where I have to deal with lot of Ajax requests. The whole UI is designed such that only appropriate parts are refreshed with required information through Ajax.
The application needs user authentication before accessing any part of it. Although this is easy to achieve in any MVC ...