Go Back
  • Sitefinity 4.x Script Management

    Today, I was troubleshooting a widget that I created which uses jQuery with the popeye plugin. My masterpage had a reference to a copy of jQuery that I am hosting on a static domain referenced by multiple websites... like using a CDN, but just have a single server.

    When in the backend of Sitefinity, they are using jQuery, so there was a conflict loading multiple copies of jQuery and my widget would not display.

    See ...

  • jQuery Shuffle

    Just used a helpful plugin to put some list items in a random order.

    http://yelotofu.com/2008/08/jquery-shuffle-plugin/

  • Image Scroller with Random Order

    I just needed to make a scroller of some books, the option to view them larger and to have the order different every time the page loads.

     

    For the slide show or scroller effect, I used the jQuery popeye plugin. This also offers the ability to view the images as a larger version.

    For the randomization, this "Shuffle plugin" at Yelotofu.com did the trick.

     

    On the popeye code, I also ...

  • Persistent jQuery Accordion with Initial Index

    I just spent a fair amount of time to get a jQuery UI accordion working to my needs.

    Here were the requirements:

    • had to allow for an initial item to be open that was not the first one
    • active item had to stay active after a postback
    • had to play nicely with other JavaScript content

    Here is what I ended up with:

    First, references to JavaScript files, which we have on our own CDN:

    • jquery-current.min.js ...

  • Avoiding jQuery Conflicts in Sitefinity

    This doesn't seem to fix my problem of jQuery cycle conflicting with the lightbox used in Sitefinity's gallery, but it may come in handy in the future:

    var $j = jQuery.noConflict();
          
         // Use jQuery via $j(...)
         $j(document).ready(function(){
           $j(".someclass").hide();
         });

    I found this on Praveen Battula's blog, but similar solutions seem to pop up other places as well.

    I believe that the Lightbox option on ...

  • Using Sitefinity's Copy of jQuery

    On your page, you need to include:

    <sf:JsFileLink id="jsLink" runat="server" ScriptType="jQuery"></sf:JsFileLink>

    This has to be used within the body, not the head.

    The reference included at the top of the page is:

    <%@ Register Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" TagPrefix="sf" %>

    These are the two needed pieces, which are expained on the Sitefinity.com website, but the part about registering the assembly is further down in the comments. ...

  • jQuery thumbnail zooming in Sitefinity

    I decided to standardize thumbnails on our news and events site to 200x200, but only display them as 50x50 when showing a list of news items.

    For a little extra visual fun, I've added some jQuery to create a zoom animation when you hover on the thumbnails. If you are interested in a news item, but can't see details of the photo well enough in the 50x50 resolution, now you can roll over the thumbnail ...

  • Randomize a List

    For our school's new web template, we wanted to have a jQuery slide show which would pull from from one of Sitefinity's image libraries.

    This is a great idea, but the slide show always started on the first image of the library and would cycle through in the same order each time.

    The answer was to first randomize the content of our array before binding the DataSource to the Listview.

    Here is the Randomize Subroutine ...