Welcome Guest. Sign in or Signup

1. JQuery General

Posted on November 17, 2012 0 Comments

how to combine jquery ui draggable, droppable and resizable?

The below code will illustrate how to combine jquery ui draggable, droppable and resizable.

Posted on November 16, 2012 0 Comments

How to share available width between dropped elements after a drop?

The below code will illustrate How to share available width between dropped elements after a drop.

Posted on October 31, 2012 0 Comments

How to know when an item is dropped and how to prevent dropping ?

Using the below approach user can know once an item is dropped on droppable area and can prevent dropping based on some condition. Below sample is based on this jQueryUISample

Posted on October 31, 2012 1 Comments

How to find an element in particular position?

Using the below approach you can find the element in an particular position.

Posted on October 25, 2012 0 Comments

How to determine if the vertical and horizontal scrollbars reaches the edges?

Use the approach to determine the scrollbars position in vertical as well as horizontal scrollbars.

Posted on September 24, 2012 1 Comments

How to listen lazily to rapidly firing events like window resize?

Sometimes you get notified way too many times than you wish. A good example is the window resizing events which you would rather not get notified for every pixel move. Here is a way to “group” these events and get notified at specific intervals:

Posted on September 22, 2012 2 Comments

How to unbind all event handlers setup within a plugin or widget?

You can painstakingly track all the event handlers that you have used to bind to jquery events or you can use namespaces in your handlers and then unbind them all in a single line of code. For more information refer Namespaced Events.

Posted on September 20, 2012 0 Comments

How to reload a page with a different argument?

Sometimes you load a page with arguments and then you might have to reload it with a different argument. Here is a pattern to do so:

Posted on September 18, 2012 0 Comments

How to call a base function from a overridden java script “sub class”?

To call the base function you have to access the sub function prototype which has the reference to the original base function and call it like this:

Posted on September 18, 2012 0 Comments

How to workaround $.inarray issues?

If you have a collection of objects, you cannot use $.inarray to find out the index of an object in the collection. $.inarray has a bug as of this writing (Sept, 2012) which makes it usable only with primitive type collections. To work around this, first override the Array.indexOf prototype like this: