Inserting jQuery UI widgets in Suffusion

Nov 032013
 
 Posted by on 03/11/2013 How-To's Tagged with: , , , , , ,  Add comments

An example of usage of jQuery plugins with Suffusion as it was presented in the post about Adding jQuery.

For obtaining the accordion from our What we did page I used the collapsible version of jQuery-UI Accordion widget.

If you go on jQuery-UI page (linked above) and press View Source link will see the code for an HTML page which contain all informations needed for making accordions to works. First, we can see in   section this code:

In this case we can use directly the links provided by jQuery-UI page – we don’t need to download anything. The required links are contained in Quick Access section at the bottom of the page:

Quick Access section on jQuery-UI page
Quick Access section on jQuery-UI page

So, at  Suffusion Options -> Back-end -> Custom Includes -> First Additional Stylesheet link we add the path to the main stylesheet file: https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css

– at Suffusion Options -> Back-end -> Custom Includes -> First External Javascript file I added the path to the main js file: https://code.jquery.com/ui/1.10.3/jquery-ui.js (You don’t forget – we don’t need the link to the jQuery library)

– The <script>  tag contained in the html code from the jQuery-UI site is the trigger function for accordions. We will add the code in noConflict mode at Suffusion Options -> Backend -> Custom Includes -> Custom Header Javascript:

 Done. From now we can present our content in accordion style on any page where will wrap  our content in a div with the id “accordion”. The tab titles are formed by the content of <h3>  tags:

That’s it, you have the content showed in a nice accordion style. Of course, in the same way can add tabs, dialogs, buttons, sliders… anything you wish.

https://drafie-design.nl/inserting-jquery-ui-widgets-in-suffusion/trackback/Trackback URI:  

Ciprian

Experienced web developer and graphic designer. Former consultant for Suffusion theme and former moderator on Suffusion Support forum. I teach others while learning myself.

Google+ Profile

    Google+ Page

 Leave a Reply

(Your comment will be published. To contact me privately, use the contact form.)

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  One Response to “Inserting jQuery UI widgets in Suffusion”

Pingbacks (1)
  1. […] jQuery UI Widgets  Horizontal Dropline Menu […]