ajaxstop doesn't seem to fire in jquery 1.4
I am having a problem with ajaxStop in jquery 1.4 I tried transitioning to 1.4 from 1.3.2 and the only thing that I noticed that wasn't working was my "loading" div, never hid. My code is: $("#loadingMessage").ajaxStart( function(e) { $(this).show(); }).ajaxStop( function(e) { $(this).hide(); }); Which (as you can see) is pretty straightforward. The ajaxStart event definitely gets fired, but the ajaxStop event never does. If anyone has any suggestions I would be grateful. Thanks Jonathan
overlay on top of a control
I am using Simple Modal to implement a basic modal dialog on my page. However, instead of graying out the whole page, I would like to just gray out a div or a table and center the modal dialog accordingly to that div/table. I've been searching for a solution for the following issue but have not been successful so far. Any help is appreciated. Thanks,
Linking directly to dynamically loaded content.
Hi All, Need some advice. I have a site that shows off video clips. When a clip is 'clicked' the video and related data is loaded in using jQuery. The page does not refresh. I now need to link directly to different 'videos', but am unable to because a click hasn't taken place to load the video in. It just loads the categories page. What would be the best way to allow me to link directly to the video... ? Will I need to edit my .htacess file? Will I need to somehow work out what clip they are trying
Autocomplete Plugin ordering of full list?
Hi, I have 2 level category's rendered in the header. With minChars: 0, on double click, entire list is displayed, but in alphabetical order. Because of 2 level category's, I want to show them as they were already ordered locally, before any keystroke. After keystroke, filtered result is shown... like it should Thanks in advance
problemas con el jquery de validacion
como puedo validar varios select en un mismo validacion
Superfish - navbar - subitems appearring behind one another
Hi, I am putting together a superfish navbar. I have basically copied all code, replaced li names to ensure that I have the basic navigation down. My issue is that one set of subitems is longer than the rest, and as you hover the other "tabs", the subitems for the newly hovered tab appear (as they should), but the longer list of subitems still appear behind them to the right. Am I missing something? Thanks
IE6 problem with animate function with image in position absolute
Hi, I'm using a slide system (div wich moving up or down and the content is hide at the slide end) on a div using the animate function of jquery. My problem is on IE6 ; pictures placed with position absolute are still displayed at the sliding end. If I don't use position absolute, it's good. On firefox, no problem of course. My code : The sliding div in my page (php): while ( $row = mysql_fetch_array( $sql_participants ) ) { make_fiche_75x92(); if ( $row['waiting_list'] == 1 ) echo '<script type="text/javascript">$(".small_picture_75x92").fadeTo(0,0.8).append(\'<img
Filtering variables that represent jQuery objects
I've got a variable that holds a jQuery object. I would like to filter out all of the visible elements in that jQuery object. The problem is once I'm using a variable and not the jQuery object itself I don't know the semantics for filtering it. I have something like this: var Foo = $("#Bar"); FilterFunction(Foo); function FilterFunction(Foo) { var Test = $(Foo + ":visible"); } What is the correct syntax? Thanks very much, BKahuna
Can you put a variable inside the n-th child?
I'm using the following to sequentially change the background color of some list items. It works, but is there a direct way of putting a variable inside the n-th child parentheses, instead of concatenating? Second question, more CSSey, though. The highlight goes all the way across the page since the CSS bounding box is 100% for the li items. The lines are various lengths so I can't just set the bounding box to, say, fifty percent. Is there a way to use jQuery to make the bounding box, or background
Call functions outside document.ready
Dear programmers, I'm quite new to Javascript and jQuery in general, and now stuck with a problem. In my header I added a Javascript file like this: $().ready(function(){ function hello(){ alert('hello'); } } What I want now is calling the hello function from the body. Is that possible? My browser gives an error that the function is undefined. Also with statements like this: <script language="javascript"> if($(document).ready){ hello(); }; </script> Hope some of you can help me!
what happens to bind and data when an object is removed from the page?
If I have a div [ id="divId"] with a button on it [ id="divBtn" ] , and I add some data to the div and I bind a click event to the button: e.g. $("#divId").add("dname","value"); $("#divBtn").bind("myEvent", function(){...});What happens to the data and button bind event if I remove the div? e.g. $("#divId").remove();Are they cleaned up? Or, do I need to unbind and removeData before I remove the div? Thanks!
slideToggle - different speeds for showing/hiding
Hi, Is it possible using slideToggle to set a faster speed for hiding than for showing? Thanks
Fastest way to get nextSibling('foo')?
What is the fastest and easiest way to get the first matching sibling (in a given direction) with jQuery? This works, but I'm not sure that it's the best approach. $('#foo').nextAll('.bar:first'); $('#foo').nextUntil('.bar').next();
Ajax post and Web-kit browsers
I posted this problem in the old mailing list, but I thought I’d try here with a larger set of eyes. My issue seems to concern webkit browsers. I am sending information from a form with a jQuery click function. I am loading the response from one form that is a DIV called rightContent to the same DIV and passing the information along. While in IE and FireFox the data is passed to the DIV rightContent, in Chrome and Safari the data is plotted as a new page, as I can see from looking at the address
Colspan doesn't work with user toggle
Dear user, I'm using jQuery now for 1 week and it works great! I have only 1 problem. The collspan doesn't work with the toggle option. Can someone tell me what i'm doing wrong? <script type="text/javascript"> $(document).ready(function() { $("tr.hiddenedit").hide(); $("a.edit").click(function() { $(this).parent().parent().next("tr.hiddenedit").slideToggle(); }); });</script> <tr class="table_row_2"> <td> #1</td> <td>Admin login title</td> <td>test</td> <td><a href="#" class="edit" ><img src="http://localhost/v3/includes/icons/page_edit.png"
Ordering multiple events on a single function...
$(document).ready(function(){ $(".slide-button-one").click(function(){ $("#main-content-info").slideToggle(800); $("#main-content-portfolio").toggle(); return false; }); });Here is the application for this javascript. When the .slide-button-one (top 'Profile', 'Clients' or 'Contact' links) is clicked, #main-content-portfolio (white-background div) slides down and the display is set to none. This reveals #main-content-info (grey-background div). Currently however, the display value of #main-content-portfolio is
Extending a jquery function
Hey people, I want to extend the jquery functions .append and .appendTo. I need them to fire a change event when the functions are applied to a div element. I thought it would work like this: var oldAppend = $.fn.append; $.fn.append = function (content) { oldAppend.apply(this, content); $(this).change(); } Didn't work :( Any ideas, let me know. Greetz, Rick
Need Dreamwaver Extension of jquery 1.4 latest
http://xtnd.us/dreamweaver/jquery i installed this verison jquery api 1.2 version but i need latest ...Any one HELP
On div content change event?
Hey people, Just a quick question. I got a div and I want to know when the html of that div is changed. Their are alot of options this happens so it would be easier to make a custom event for this situation. I'm just lost on how to approach this. Anybody have a idea? Please let me know. Greetz, Rick
jQuery and Flot
I have been using flot to create a graph with zooming and tracking (so that the legend updates with the values of the graph when the mouse is hovering over the canvas). The tracking works fine when it is originally loaded, however when I zoom in the tracking no longer works. I use this code to 'bind' the tracking of my graph: updateLegendFuntion = function(event, pos, item) { latestPosition = pos; if (!updateLegendTimeout) updateLegendTimeout = setTimeout(function()
$.getJSON() Jquery 1.4
code: $.getJSON("json.js",function(data){alert(data["name"])}); json.js code: {name:"Gilson"} In the old version works, but in version 1.4 does not work. Could test to see if the same happens? Sorry my bad english.
assign value to global variable in javascript from jquery ajax function.
Hello, Hello, I want to assign value to global variable in javascript from jquery ajax function. var trueFalse; $.ajax({ type: "GEt", url: "url", data: "text=" + $("#text").val(), success: function(msg) { if(msg.match(/OK/) != null) { trueFalse = "true"; } else { trueFalse
onclick event change url using jQuery
Hey guys, I would like to change the webpage when someone changes the select input and then clicks Go. Unfortunately I've not been able to with jQuery, here's what I have now, but I would like to use jQuery. HTML: <select id="productlist"> <option value="">Select a product...</option> <option value="/products/2/C">C</option> <option value="/products/1/H">HC</option> </select> <input type="button" value="Go" onclick="goTo();"> JAVASCRIPT: function goTo() { var sE = null, url; if(document.getElementById)
Excel - PMT - NaN and Infinity messages
Hello! I use this snipet, to calculate PMT. function PMT(i, n, p) { return i * p * Math.pow((1 + i), n) / (1 - Math.pow((1 + i), n)); } function CalculatePMTFromForm(idLoanAmount, idAnnualInterestRate, idMonths, idResult) { var i = jQuery('#' + idAnnualInterestRate).val() / 1200; var n = jQuery('#' + idMonths).val(); var p = jQuery('#' + idLoanAmount).val(); var pmt = PMT(i, n, -p); jQuery('#' + idResult).val(pmt.toFixed(2)); } function performCalc() { CalculatePMTFromForm('LoanAmount',
access to object property
Why am i obtaining different result calling same method using direct javascript call and throw jquery event handler? In next example, i want show alert with a text. Using jquery, result is "undefined": <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"></script> <script type="text/javascript"> function test(str) { this.str = str; this.testing = function testing() {
Problem finding the right selector
hi, i am creating a simple dynamic menu for my study with the following structure: <div id="mainMenu"> <div id="informatics" class="mainEntities"><t>Informatica</t> <div id="informaticsSub" style="visibility:hidden"> <div class='subEntities'><t><a href='#'>Mens & Informatica</a></t></div> <div class='subEntities'><t><a href='#'>Technische Informatica</a></t></div> </div> </div> and with jquery i do this: $(function () { var currentMenu = null; $(".mainEntities").mouseover(function () { currentMenu
using .remove() or .detach() after .animate()
Hi Folks, if I try something like $('<div></div>').css({...}).animate({}).appenTo('body').fadeIn(); that works as it should. But if I chain a "remove()" or "detach()" after the animate(), it does not work at all. My goal is obviously to create a new element, display anything in it, let it disappear and finally remove it from the DOM.
Possible to have one link activate another link?
Hi, Great to see jq now has their 'own' form... What im trying to do is: I have ui tabs setup which works on mouseover. I have an absolutely positioned div within the area iof each 'tab'. These links goto a page within the site. Is it possible to make a click on one of the tabs activate one of the absolutely positioned divs? Thanks.
JQuery Index Query
Hi, Just assume I have the following code (not exactly but similar one), <ul> <li><a onclick="SomeFunction()">First</a></li> <li><a onclick="SomeFunction()>Second</a></li> <li><a onclick="SomeFunction()>Third</a></li> </ul> _____________________ Whenever, a onclick event occur I need to a additional li there. for eg, if a onclick event occur in the 'First' then the code should be changed using AJAX like below, <ul> <li><a onclick="SomeFunction()">First</a> <ul><li><a onclick="SomeFunction()">sub
Trying to change the href attribute of .load(ed) content.
I'm pretty green to jQuery. I have a .load() calling in some content that has some links within it. After that content is loaded, am I able to change the attributes of those links? This is how I'm loading in the content: $(".maincontent").load(pages[0] + '?' + tsTimeStamp + ' .maincontent'); Which contains: <a class="table_button0" href="#"></a> <a class="table_button1" href="#"></a> <a class="table_button2" href="#"></a> <a class="table_button3" href="#"></a> <a class="table_button4"
There is a bug for $(btn).live("click, fn) on FireFox
The .live("click") event binding also react with mouse right-click on FireFox.
Converting native javascript to jquery
Hello I need some help converting this to jquery javascript function center() { var rcontent = document.getElementById("left").getElementsByTagName("*").length; if (document.getElementById("left").getElementsByTagName('img')[0]) { var imgtag = document.getElementById("left").getElementsByTagName('img')[0].src; if (imgtag.indexOf("test") > 1 && imgtag.indexOf("trans.gif") > 1) { document.getElementById("outer").style.width='1400px' } else if (imgtag.indexOf("trans.gif")
confused by timing
Another newbie question. Something like this chain: jQuery("p").fadeOut(2000).fadeIn(2000).css("color","red"); I thought it would fade out, then fade in, then turn red, but it turns red immediately. Most of the timing-related funcs don't work quite the way I expect. Can someone explain in newbie terms
Error: WRONG_DOCUMENT_ERR: DOM Exception 4 in Safari
Hi all, I'm trying to do the following: open a new window when a button is clicked and move some dom element in the current page (including a <canvas>) to the new page. var w; function newWindow() { $(w.document.getElementById('new')).append($('#plot')); //this removes the plot from current page - which is fine w.print(); } w = window.open('print.html', 'title'); setTimeout("newWindow()", 200); //gives some time for new window to loadThis works in Opera 10 and Firefix 3.5, but Safari gives an error
checkbox names aggregate as array in a hidden input value
Hey all, I asked this around the chatroom and got some good feedback, but ultimately I couldn't get this to work. In a form, I have multiple checkboxes which represent products whose values are the product prices and names are the product names. When a user clicks submit the next page processes it for cart/purchase purposes. I need to pass the names of each checkbox to the next page as an array, and it seemed the best way to accomplish this would be to have a hidden input which automatically generates
problem (IE8) inserting 'alternate rss link ' in "head" section fails. ( Succeeds in Firefox 3.5)
Hi, Here is our usecase: * we want to use jquery/javascript to add the "rss link" (i.e. <link rel='alternate' type='application/rss+xml' href='/path/to/thirdsome/rss'> ) to the <head> section of the document * I added this code to a test page: <script type="text/javascript"> $("<link rel='alternate' type='application/rss+xml' href='/path/to/thirdsome/rss'>").insertAfter("meta"); </script> * It works in Firefox (version 3.5) * It fails in IE8 * when it fails in IE8, it actually breaks any
jQuery 1.4 + IE7 + flot 0.6 + jsonp 1.0.4
Hi - I've found this strange one using flot and jsonp. I get an error with JQuery 1.4 that I do not get with 1.3.2. The error occurs in IE7, but not in Firefox. I'm using jsonp (http://jquery-jsonp.googlecode.com) to get graph data and flot (http://code.google.com/p/flot/) to render that data. In IE7, I have a scenario where this works OK $.plot($("#chartDiv"), [{"lines":{"show":true},"data":[[1259625600000,5305],[1259712000000,6539]]}] ); But retrieving that same json data via ajax call cause
Draggable element "fly away" in Google Chrome
I have a little application where I drag and drop a letter to a designated area, make that newly dropped letter draggable and then have the option to drag it back to the original area to undo what I did: http://jimandkris.com/dragdrop/ It works great in FireFox. However, in Google Chrome, the initial drag and drop works, but the letter flys away or shoots across the screen when I try to drag it back. I've been Googling and trying to debug all day with no luck. Can anyone offer me a suggestion to
Problem accessing content of style tag in head
Hello, it's nice to see the new forum! (Note: the post editor is slow as a dog when Firebug is enabled :) Anyway, I'm sure there's a simple answer to my conundrum. I'm trying to access the contents of a style tag in an ajax loaded document. Within the primary document, this (yaml inspired psuedocode) works just dandy: html index.html head style body{color:red} script jquery script console.info($("style").html();); //correctly outputs: "body{color:red}" body
How do I get a trigger after .each completes?
I'm using .each and .delay to have a background color crawl down some list items, as below. But I can't figure how to then trigger a change, such as another background color, after all the .each iterations are complete. Everything I do with the returned object happens immediately. Suggestions? tks. <script type="text/javascript"> var saveObj; jQuery(function(){ jQuery('#text li').each(function(i){ jQuery(this).delay(i*1500).fadeIn(1500,function(){ jQuery(this).css({'background-color':'orange','border':'solid
Next Page