Support » Plugin: cSlider » 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.

    http://wordpress.org/extend/plugins/cslider/

Viewing 1 replies (of 1 total)
  • Thank you for the fix! This helped me out a lot.

    PLEASE ADD THIS TO THE NEXT RELEASE. 🙂

    Thank you!!

Viewing 1 replies (of 1 total)
  • The topic ‘jQuery conflict with theme(fix included)’ is closed to new replies.