jQuery conflict with theme(fix included)
-
I don’t wanted to investigate more, but I share my solution, so maybe you can add it to the code, also maybe you can improve it.
This worked for cslider 2.4.2 jquery conflict
cslider/cslider.php
changed this:// $htmlOutput = “<script src=\””.WP_PLUGIN_URL.”/cslider/scripts/jquery-latest.js\” type=\”text/javascript\”></script>
for this:
$htmlOutput = ‘
<script type=”text/javascript”>
if (typeof(jQuery) === “undefined”) {
var loadjQuery = document.createElement(“script”);
loadjQuery.setAttribute(“type”, “text/javascript”);
loadjQuery.setAttribute(“src”, “‘ . WP_PLUGIN_URL . ‘/cslider/scripts/jquery-latest.js”);
document.getElementsByTagName(“head”)[0].appendChild(loadjQuery);
}
</script>
‘;
$htmlOutput .= “ALSO
$(document).ready(function(){
$(‘.cslider”.$slideID.”‘).bxSlider({FOR
jQuery(document).ready(function(){
jQuery(‘.cslider”.$slideID.”‘).bxSlider({Hope you can fix the plugin with this or any other fix, thank you for such great plugin.
- The topic ‘jQuery conflict with theme(fix included)’ is closed to new replies.