WordPress.org

Ready to get started?Download WordPress

Forums

jQuery (1 post)

  1. djhowden
    Member
    Posted 1 year ago #

    I have a form, on a theme option page that has 8 jQuery sliders and one of the sliders calls an exception by being undefined. It has the style applied from ui-js and jQuery has appled the style, html and a link to turn it into a slider, so it was in the dom of jQuery but is now undefined. Its confusing because all the other sliders work, and one of them is created in the same statement the broken one is. The only thing I can think is that the Admin side is loading jquery, passing all my page apart from my broken element to a new jQuery object. I have deregistered jQuery and re queued it, made sure all my scripts are in the footer, even tried some javascript to hold document.ready till my scripts are loaded, I tried localising jQuery. The control I have built with the sliders works outside wordpress.

    Has anyone come across this and what's the way way to fix it?

    jQuery(document).ready(function($) {
    $( "#orientation-tool,#bgorientation-tool" ).slider({
    min: 0,
    max: 100,
    value: 90,
    slide: function( event, ui ) {
    setPreview();
    }

    as you can see its nothing elaborate, #orientation-tool works while #bgorientation renders its style as a slider but when it calls the mouse class on it its returning an undefined object.

    One works, one doesnt??? lol any clues would br appreciated

Topic Closed

This topic has been closed to new replies.

About this Topic