Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jcarousel plugin is not working in sitecore preview mode

jcarousel plugin is working when we run the page on browser but if we run the same page in sitecore preview mode(In sitecore: Click on Presentation in the top menu. Click on Preview in the ribbon) then this plugin is not working. please let me know if you have solution that would be helpful.

like image 872
Gaurav Agarwal Avatar asked Oct 21 '22 18:10

Gaurav Agarwal


1 Answers

Which version of Sitecore do you use? I think the problem might be with jquery conflicting with prototype.

You can try to use jquery in noConflict mode:

var $j = jQuery.noConflict();

In nutshell, add this line before the place you initialize your jcarousel, e.g.:

var $j = jQuery.noConflict(); // switch jquery to noconflict mode

$j('.jcarousel').jcarousel(); // this is your initalization of jcarousel

More explanation in jquery conflicts with pageeditor article

like image 142
Marek Musielak Avatar answered Oct 24 '22 10:10

Marek Musielak