• Resolved d4jaj1

    (@d4jaj1)


    Hello,

    I’m having a jQuery conflict issue I’m unclear how to resolve. The problem is I’ve added some jQuery vertical tab code to one of my pages that’s conflicting with one of my plugins.

    The plugin in question is WP-Lightbox 2. It references the WP installation (/wp-includes/js/jquery) of jQuery. The last line of that file contains “jquery.noconflict;”. When I remove this line, Lightbox 2 stops working – but my vertical tab code works. Add it back and Lightbox works, but my code doesn’t. I’ve tried “$j=jquery.noConflict;” but that doesn’t work either.

    Any suggestions on where I should be looking to fix this? Here’s my vertical tab code:

    <script type="text/javascript">
            $(function() {
                var $items = $('#vtab>ul>li');
                $items.mouseover(function() {
                    $items.removeClass('selected');
                    $(this).addClass('selected');
    
                    var index = $items.index($(this));
                    $('#vtab>div').hide().eq(index).show();
                }).eq(1).mouseover();
            });
        </script>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘jQuery.noConflict Issue’ is closed to new replies.