* Changed JS-code to use Drupal.behaviors in both JS-files.
* Using Drupal.behaviors garantee that JS code will be attached to all new elements in DOM automaticaly.
* Aslo used jQuery queuing where it is posible to reduce number of searches in DOM.
* Added using context in $(selector, context) where it is necessary. This will give more speed at newly added to DOM elements.

Comments

vladsavitsky’s picture

Patch was attached.

vladsavitsky’s picture

This patch included in patch http://drupal.org/node/1030638.

optalgin’s picture

Thank you for applying patches,
For some reason when clicking the attachment I get redirected to drupal home page
(maybe it's the # sign?)
Please post the patches again

vladsavitsky’s picture

Reattached without '#' sign.

chuckbar77’s picture

subscribing

manuel garcia’s picture

Status: Needs review » Reviewed & tested by the community

Yup,makes sense, and this patch is a must for js in drupal.

igorik’s picture

subscribe

optalgin’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -JavaScript, -optimization, -behaviors

Automatically closed -- issue fixed for 2 weeks with no activity.