Issue #621 new

jqPlot and prettyPhoto.js conflict.

casey govero
created an issue

is there any workaround to get prettyPhoto and jqPlot to work together??? I've solved the issue by detecting the pages name, and only loading jqPlot on a certain URL. I also tried using jQuery noConflict, but that didn't solve the issue.

I solved my issue by doing:

function getUrl() { var pos = window.location.href.indexOf(window.location.host); return window.location.href.substring(pos+ window.location.host.length); }

jQuery(document).ready(function($) { jQuery('ul#sf-menu').superfish({autoArrows: false}); jQuery("a[rel^='prettyPhoto']").prettyPhoto();

});

//Only include jqPlot for making charts if its the Treaty Re Page. Otherwise it conflicts with prettyPhoto, //so you have to instantiate jqPlot only on the page needed. if(getUrl() == "/index.php/products/treaty-reinsurance" || getUrl() == "/index.php/treaty-reinsurance-left"){

StartChart(); // custom function wrapped around jqPlot instantiation

}

Comments (1)

  1. Log in to comment