utorak, 18. prosinca 2012.

Jquery Nggallery Cycle Wordpress plugin- rotating images

Jj-ngg-jquery-cycle wordpress plugin is plugin for linking to created nggallery in wordpress and showing it as
dinamically moving images.

Shortcode for plugin to use on page is:

[jj-ngg-jquery-cycle html_id="about-cycle" gallery="1" width="600" height="400" timeout="2000" speed="1000" fit="1" ]

and this assumes that you have created nggallery with id = 1 and put some images inside.

There is also a posibility to use onBefore callback of this plugin. It lets you do something before images changes.

If you look at your page source where you have put the plugin it will show you something like this:



  jQuery('div#about-cycle').jjcycle({timeout: 2000,speed: 1000,height: 400,fit: 1});


This is the code that plugin inserts into html of your page. To use onBefore Callback you can add to your page something like this

jQuery(document).ready(function(){
jQuery('div#about-cycle').jjcycle({before:onBefore});
});
function onBefore() { 
//do something here before image changes
}


Simple plugin yet creative.

You can read more about this plugin on 

 

Nema komentara:

Objavi komentar