Search Results

Search found 6 results on 1 pages for 'niczoom'.

Page 1/1 | 1 

  • jquery-ui .draggable is not a function error

    - by niczoom
    I am getting the following error (using Firefox 3.5.9): $("#dragMe_" + myCount).draggable is not a function $("#dragMe_"+myCount).draggable({ containment: 'parent', axis: 'y' }); Line 231 http://www.liamharding.com/pgi/pgi.php Link to page in question : http://www.liamharding.com/pgi/pgi.php For example, click the 2 checkbox's 'R25 + R50 Random Walk' then click Show/Refresh Graphs. Two graphs should be displayed, both with draggable thin horizontal red lines. Re-open the options panel and de-select R50 Random Walk, now click Show/Refresh Graphs again, 1 graph is removed and the other updated; now re-select R50 Random Walk and click Show/Refresh, you will find the still checked R25 graph gets updated ok the above error occurs and i cant figure out why. Initially, when displaying the first 2 graphs it uses the same code and it works just fine. The error occurs on this line: //********* ERROR OCCURS HERE ********** $("#dragMe_"+myCount).draggable({ containment: 'parent', axis: 'y' }); Here is the code for the Show/Refresh Graphs.click() event: $("#btnShowGraphs").click(function(){ // Hide 'Options' panel (only if open AND an index is checked) if (IsOptionsPanelOpen && ($("#indexCheck:checked").length != 0)) {$('#optionImgDiv').click();}; var myCount = 0; var divIsNew = false; var gif_loader_small = '<div id="gif_loader_small"></div>'; var gif_loader_big = '<div id="gif_loader_big"></div>'; $("input:checkbox[id=indexCheck]").each(function() { if (this.checked) { // check for an existing wrapper div for the current forex item, using the current checkbox value (foxex name) if ( $("#"+this.value).length == 0 ) { console.log("New 'graphContainer' div : "+this.value); divIsNew = true; // Create new divs for graph image, drag bar and heading var $structure = " \ <li id=\""+this.value+"\" class=\"graphContainer\"> \ <div id=\"dragMe_"+myCount+"\" class=\"dragMe\"></div> \ <div id=\"image_"+myCount+"\" class=\"image\"></div> \ <div id=\"heading_"+myCount+"\" class=\"heading\"></div> \ </li> \ "; $('#graphResults').append($structure); // Hide dragMe DIV $('#dragMe_'+myCount).hide(); // Make 'dragMe' draggable div //********* ERROR OCCURS HERE ********** $("#dragMe_"+myCount).draggable({ containment: 'parent', axis: 'y' }); } // Display small loading gif $(gif_loader_small).clone().appendTo( $(this).parent() ); // Display large circular loading gif var $loader = $(gif_loader_big); // add temporary css attributes onto existing graph divs as they need to be displayed diffrently if(!divIsNew){ console.log("Reposition existing 'gif_loader_big' div"); $loader = $(gif_loader_big).css({ "position" : "absolute", "top" : "35%", "opacity" : ".85"}); } // add newly styled big-loader-gif to index div $loader.clone().prependTo( $("#"+this.value) ); // Call function to fetch image using ajax get_graph(this, myCount, divIsNew); } else { // REMOVE 'graphContainer' DIVS NOT CHECKED // check for div existance if ( $("#"+this.value).length != 0 ) { console.log("DESTROY: #dragMe_"+myCount+", REMOVE: #"+this.value); // DESTROY draggable //$("#dragMe_"+myCount).draggable("destroy"); // remove div $("#"+this.value).remove(); } } // reset counters and other variables myCount++; divIsNew = false; console.log("Complete: "+this.value+", NEXT index"); }); });

    Read the article

  • jquery - loose click() event after ajax call ???

    - by niczoom
    At the following webpage liamharding.com/pgi.php I have an option panel on the left side of the page which opens and close's upon clicking the panels 'arrow', this works fine until you select a market (for testing use one of the 'Random Walk' markets and click 'Show/Refesh Graphs'), this then makes an ajax call using get_graph(forexName, myCount, divIsNew) function. Once this call is completed a graph(s) is displayed and then my options panels click() event does not work? The ajax call returns the data in a variable ajax_data, the problem happens when I perform the following code var jq_ajax_data = $("<div/>").html(ajax_data); . I need to wrap it in a so I can extract data from it using jQuery. If this line of code is commented out the click() event works fine ?? Hope somebody can help, I have spent a lot of time but cant find what the problem is.

    Read the article

  • jquery - lose click() event after ajax call???

    - by niczoom
    At the following webpage liamharding.com/pgi.php I have an option panel on the left side of the page which opens and closes upon clicking the panels 'arrow', this works fine until you select a market (for testing use one of the 'Random Walk' markets and click 'Show/Refesh Graphs'), this then makes an ajax call using get_graph(forexName, myCount, divIsNew) function. Once this call is completed a graph(s) is displayed and then my options panels click() event does not work? The ajax call returns the data in a variable ajax_data, the problem happens when I perform the following code var jq_ajax_data = $("<div/>").html(ajax_data); . I need to wrap it in a so I can extract data from it using jQuery. If this line of code is commented out the click() event works fine ?? Hope somebody can help, I have spent a lot of time but cant find what the problem is.

    Read the article

  • Display data requested by an ajax.load() call once complete, not during the call.

    - by niczoom
    My jQuery code (using ajax) request's data from a php script (pgiproxy.php) using the following function: function grabPage($pageURL) { $homepage = file_get_contents($pageURL); echo $homepage; } I then extract the html code i need from the returned data using jQuery and insert it into a div called #BFX, as follows: $("#btnNewLoadMethod1").click(function(){ $('#temp1').load('pgiproxy.php', { data : $("#formdata").serialize(), mode : "graph"} , function() { $('#temp').html( $('#temp1').find('center').html() ); $('#BFX').html( $('#temp').html() ); }); }); This works fine. I get the html data (which is a gif image) i need displayed on screen in the correct div. The problem is i can see the html data loading into the div (dependant on network speed), but what I want is to insert the extracted html code into #BFX ONLY when the ajax request has fully completed.

    Read the article

  • Retrieving information from DOM elements returned using ajax

    - by niczoom
    I am new(ish) to jQuery and am testing out the extraction of DOM element data using jQuery. Below, detailed on the firebug console I tried to extract data 10 different ways (from 1- to 10-) using data returned directly from the ajax request (rtnData). And then to compare, I wrapped (rtnData) in a div to make it a jQuery object, and stored it in $test, (var $test= $('<div/>').html(rtnData);) Displayed below in Firebug Console Output, I cant figure out is why 5- return's nothing and e- returns the center tag contents. Same with 8- and e-, they both look for #ticker div id but 8- returns nothing and e- returns the correct html?? Also when searching for h1 tag .text(), why does 10- return blank and j- return the correct data? Thanks, Nic. Use the following page to run the ajax request below in Firebug Console: http://www.liamharding.com/pgi/pgi.php jQuery code ran using Firebug Console: $.ajax({ url: 'pgiproxy.php', type: 'POST', dataType: 'html', data: ({ data : $("#formdata").serialize(), mode : "graph"}), success: function(rtnData){ console.log("0- ", rtnData); console.log("1- ", $('img', rtnData)); console.log("2- ", $('a', rtnData)); console.log("3- ", $('span.cr', rtnData)); console.log("4- ", $('span.cr', rtnData).html()); console.log("5- ", $('center', rtnData)); console.log("6- ", $('table', rtnData)); console.log("7- ", $('#ticker_data', rtnData)); console.log("8- ", $('#ticker', rtnData)); console.log("9- ", $('#last', rtnData)); console.log("10- ", $('h1', rtnData).text()); var $test= $('<div/>').html(rtnData); console.log("z- ", $test); console.log("a- ", $('img', $test)); console.log("b- ", $('a', $test)); console.log("c- ", $('span.cr', $test)); console.log("d- ", $('span.cr', $test).html()); console.log("e- ", $('center', $test)); console.log("f- ", $('table', $test)); console.log("g- ", $('#ticker_data', $test)); console.log("h- ", $('#ticker', $test)); console.log("i- ", $('#last', $test)); console.log("j- ", $('h1', $test).text()); }, error: function(){ alert('ERROR'); } }); Firebug Console Output: 1- jQuery(img#GnuPlotChart 624e4629...8946.gif) 2- jQuery(a.button javascri...eload();, a.button javascri...close();) 3- jQuery(span.cr) 4- <span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span> 5- jQuery() 6- jQuery(table.rbox-table) 7- jQuery(div#ticker_data.rbox) 8- jQuery() 9- jQuery(th#last, td#last.num) 10- z- jQuery(div) a- jQuery(img#GnuPlotChart 624e4629...8946.gif) b- jQuery(a.button javascri...eload();, a.button javascri...close();) c- jQuery(span.cr) d- <span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span> e- jQuery(center) f- jQuery(table.rbox-table, table) g- jQuery(div#ticker_data.rbox) h- jQuery(div#ticker) i- jQuery(th#last, td#last.num) j- Legacy Charts

    Read the article

  • Delay the display of image loaded using jquery + ajax

    - by niczoom
    I am using the following code : $.ajax({ url: "pgiproxy.php", data: ({ data : $("#formdata").serialize(), mode : "graph"}), success: function(result){ var temp = $('<div/>').html(result); var val = temp.find('center').html(); $('#BFX').html(val); }, error: function(){ $("#error").html("ERROR !!!"); } }); The 'result' from the ajax call to 'pgiproxy.php' is a whole web page (returned as a string), this is then converted to a jQuery object and stored in 'var'. I then extract the data I need (a .gif image) using .find() which is stored in 'val'. This image is then inserted into a #BFX div for display. My problem is every successive time I click my button to update this image it shows the image loading from top to bottom as it is reading it in from the web. Is there a way to only display this image once it has fully loaded so the user doesnt see the image loading and only sees the image change instantly.

    Read the article

1