jQuery best practice points to improve performance of application

1. Always Use the Latest Version 2. Use For Instead of Each 3. Use IDs Instead of Classes 4. Give your Selectors a Context As stated in jQuery’s documentation, The DOM node context originally passed to jQuery() (if none was passed then context will be equal to the document). It should be used in conjunction… Continue reading jQuery best practice points to improve performance of application

Creating multiple Fancybox galleries on the same page

Just assign a different rel attribute to each gallery. <a class=”fancybox” rel=”gallery01″ href=”product01/image01.jpg”>one</a> <a class=”fancybox” rel=”gallery01″ href=”product01/image02.jpg”>one</a> <a class=”fancybox” rel=”gallery01″ href=”product01/image03.jpg”>one</a> <a class=”fancybox” rel=”gallery01″ href=”product01/image04.jpg”>one</a> <a class=”fancybox” rel=”gallery02″ href=”product02/image01.jpg”>two</a> <a class=”fancybox” rel=”gallery02″ href=”product02/image02.jpg”>two</a> <a class=”fancybox” rel=”gallery02″ href=”product02/image03.jpg”>two</a> <a class=”fancybox” rel=”gallery03″ href=”product03/image01.jpg”>three</a> <a class=”fancybox” rel=”gallery03″ href=”product03/image02.jpg”>three</a> <a class=”fancybox” rel=”gallery03″ href=”product03/image03.jpg”>three</a> … and they all can use… Continue reading Creating multiple Fancybox galleries on the same page