Growl stacking up from left to right - hover on/off function quirk?
Hi guys, I've built a customized growler system for my site. Basically it provides users with additional contextual info depending on what they're doing on my site: // Enhanced flag for external links $('a:not([href^="http://www.ldexterldesign.co.uk/"], [href^="mailto"])').hover(function () { $('<span class="js-growler">Leave ldexterldesign.co.uk ?</span>').appendTo(this); // IMPORTANT!: Get all growls and wrap them in .js-growlerWrap // Allows us to fix the growls
append() doesn't add event handlers
I am noticing a strange thing: Trying to add new HTML elements to the document using the jQuery append() function it seems it doesn't add event handlers to the newly created elements. jQuery only seems to add these in Internet Explorer: <a href="#" onclick="alert('...'); return false;">Test</a> In Opera, Safari and Google, all my hyperlinks look something like this: <a href="#">Test</a> This code is similar to what I have written: body.append('<a href="#" onclick="alert(\'...\'); return false;">Test</a>');
Pass XMLDOM to a web service
Does anyone know how to pass an XMLDOM to a web service? I can do this through the Microsoft behaviors, so I know it can be done. I just have not figured out how to do it with JQuery. Much thanks.
Selecting radio input
In the html code below how can i select the last radio input element tried $('#div1 > :radio :last-child') $('#div1 > :radio input:last-child') both don't work. Any ideas, without necessarily adding a class to the specific radio input. NB: the number of input elements are dynamic, I just want to select the last radio input element <div id='div1'> <input type='text' /> <input type='radio' /> <input type='radio' /> <input type='text' /> </div> Benson Njonjo Web Developer http://www.verviant.com
ajax http post using jquery fails in firefox
I am having a problem with the firefox and chrome when ever i try to do a ajax post. I see that the content length is always 0 in the response and also even after specifying the datatype as 'json' the 'Accept' values in the header are set to the default values. The page works fine in IE8. I haven't checked in other versions though. I am doing a cross domain post to a web service. currently both the service and the web application reside on the same server. I tried to debug the response using fiddler.
Using .getscript to load in a div
I'm trying to use getscript to load a js file, and place it in a div id. I've seen alot of examples online of doing so via a onlick, but I'm really looking to do this during page load. Is it possible to place the executed js via getscript in a particular div?
count option in select
hi how do I know count all option in select? example: abcde result for example : 5
How to manipulate text inside of a <textarea> and use tooltips?
Hi, I'm pretty new to jquery, so I thought if I stated my problem, someone who knows the library a lot better than me can guide me to which features I need to use to make this work correctly. I have a grammar check on the server that can grammar check text... big surprise there. It'll return a list of match problems, along with the positions in the text that are flawed. It'll also send the grammar rule that was broken in plain english, to help someone fix it. So we have a list of these basically:
Open a new window browser from jquery dialog
I have a situation where i will have pass a value from the dialog window and that should open up a new browse with querystring have the value that im passing.. Here is the code that i trying to use. can some tell me what is wrong here or if there is another method to accomplish this.. thanks for your help in advance.. code snippet.... $('a[href^="http://devnetprov/OrderMain.aspx?Orderid="' + $('#tbNPNumber').val() + '"]').attr("target", "_blank"); with this code it is not happening.. I keep
Problem with $.ajax in Internet Explorer 8
Hi, we have a problem with the following function in internet explorer 8 function initial() { $.ajax({ type: "GET", url: "/components/js" }); } The internet explorer 8 throws the following error: "Object doesn’t support this property or method” at the line " $.ajax({". Is this an error of the internet explorer or a bug in jquery. The error exists in JQuery 1.2.6 and also 1.4.2. Thanks for your help. Kind regard Tiwood
[jQuery] JQuery object from another frame?
I have two frames: "code" and "display". I can use JQuery API from "display" where my "document" is, but do not know how to use it from another ("code") frame. What do I put in $()? For example in tableSorter: $(window.display.document + "#example").tablesorter() --- does not work. This is how it supposed to work: <script> $(document).ready(function(){ $("#example").tablesorter(); }); </script> Thanks, Alex.
Help with adding some aJax to the jQuery datepicker.
Hi There, I am pretty new to jQuery and AJAX but I code with CodeIgniter all the time. I have a page at www.conorhackett.com/ajax which shows what I have done so far. I would like to set up the calendar so that when I click a date it will send the selected date to 'server.php'. this script will then return a set of data related to that date. I would then like to be able change the dropdown box to contain only the returned data. How should I send the data from the php script (JSON ?) and then retrieve
asing function with parameters to onclick an div
Hi there. I love jQuery, but now I reached a line, where I cannot solve the problem. I have some div-Containers which should call a function when they are clicked. So far so easy. They are named with a name + number, that works also. But how can I give different parameters to the called function? for (var j = 0; j < i; j++) { currentDate = new Date( [.......]); $('#foo' + j + 'graph').unbind(); $(''#foo' + j + 'graph'').attr('onclick', 'functionName(' + currentDate.getUTCFullYear() + ', ' + (currentDate.getUTCMonth()
Using Load but appending to the content
Hi, I'm using load to get the content to then put into a div but I would like to append the content, can't work out how to do this without load though? $("#feed").load(url, null); What I'm trying to achieve is the following: $('#feed').append($.get(url)); Thanks for the help
Slide Bar - increments/values and form submitting
Hello, I am quite new to this all so please excuse me if these are dumb questions. Q1: How do I use the below code to output the variables dollars1 and dollars0 into a hidden form field called min and max? Q2: I would like the denominations to go from 200-4k in hundreds then from 4k-1mil by +50K then 1mil - 20mil in +500K, is there a way to do that, if so how? I sincerely appreciate any information, I hope your having a nice day, Matt <span id="price"></span> <div id="slider-range"></div>
Trouble with Forms loaded via AJAX
I'm having trouble processing forms that are loaded into a page via AJAX. I am unable to get jQuery to listen for events on the loaded forms. <html> <head> <title>Test</title> <script type="text/javascript" src="http://www.example.com/javascript/jquery-1.4.1.js"></script> <script type="text/javascript"> $(document).ready(function(){$("div#beta").load("http://www.example.com/beta1.html");}); $(document).ready(function(){$("div#gamma").load("http://www.example.com/gamma1.html");}); </script> </head>
getJson() response text truncated
I'm using getJson() to call a web service that returns a very long json string. like 350k characters. the response comes back in its entirety from the server. and i can see it in the net tab of firebug. but the jsonp callback fails because the response text is truncated at character 28816. the only error in firebug is "invalid property id" jsonp1269473615362({"d":[{"__type":"Client","ClientId":1,"AccountNumber":"11... it's because the json string isn't terminated properly because it was truncated.
Unwanted border around HTML button
Hi, I'm using jQuery to handle clicks on buttons of a given class and encounter a graphical problem with Internet Explorer 8: each button that was clicked appears like framed. The screenshot attached shows this (see the "+1" button). $('.' + class_add).click(function () { addToCart(this, this.name, this.id); alert('This alert box displays as expected.'); return false; }); In Firefox and Opera, the button keeps the focus after the click, but this pseudo-frame does not appear. This is the behaviour
Validate textfield content without submit button
Hello; I would like to validate the contents of the textfield whenever I leave it without clicking a submit button. (I'm using struts2-jquery-plugin-2.0.0.jar), do you have any idea about this?? Thank you Best regards
Clicking checkbox doesn't change its checked/unchecked status
I have a set of checkboxes that trigger events on a page. Clicking a checkbox triggers the event correctly and the checked attribute changes in the page source, but in the rendered browser view the checkbox status remains changed. If I load the page with the checkboxes checked, they always remain checked in the browser view. If I load the page with checkboxes unchecked, they always remain unchecked in the browser view. If I remove the jquery code the checkboxes work as expected, but obviously don't
Focusout and .live
I'm trying to use .live to assign handlers to my inputs' focusin and focusout events using the code below: jQuery("input.msg").live("focusin focusout", function(event) { var me = jQuery(this); if (event.type == "focusin") { me.data("orig",me.val()).removeClass("msg").val(""); } else { if (me.val() == "") me.addClass("msg").val(me.data("orig")); } });Focusout never fires. If I use .bind, it works. I use Ajax to add input fields though, so .live would be much better
What is the best way to intercept this kind of form?
I have a form that contains a lot of dynamic set of form inputs and types. These elements are generated on the server. The id's/name's of these elements are also dynamic, depending on the database. To make things more complex, these tags need to hold state and be able to restore state at any time. I managed to do all of this, but I did it in such a way that I use <input>, <textarea>, etc. elements as well as a submit button, but I am not using <form>. This works just fine when the user "clicks"
Copy a Textfield value with jquery
Hi, Plz how can I do the same TextField example that is in the following url: http://struts2-jquery.appspot.com/home.action# with struts2-jquery 2.0.0 I have tested the folowing code to copy a value from textfield source to textfield destination: Enter String: <sj:textfield onChangeTopics="textfieldUpdated" id="source" name="sourceString"/> Copy String: <sj:textfield reloadTopics="textfieldUpdated" src="texfieldDestination.action" elementIds="destination"/> but the attribute "src" and "elementIds"
Dynamic loading of stylesheets
Hi! Is there API to loading stylesheets dynamically? This Roadmap to 1.4 (old of course) lists such feature, but I'm not sure where it is defined in API of 1.4.2, if anywhere? jQuery.ajax does not seem to have dataType of css either... Basically I need to inject a certain stylesheet to iframe (after it is loaded) preferably with cross-browser compatibility.
jquery appended html id
Hello I`m trying to access an element generated by append() : i have this : .append("<a id='delete_button_team_member' href='javascript:void(0);'><img src='_assets/images/icons/delete.png'/></a></div>"); and try to : $("#delete_button_team_member").click(function(){alert("ceva");}); what i am doing wrong ? i have searched but found nothing about this.
How to disable submit button AFTER form submission?
Everywhere proposed solution $('form').submit(function() { $(":submit").attr("disabled", "disabled"); }); doesn't work for me, because in that case the button name and value won't be included in the request to the server (because the button is disabled), and I've got a situation where I need to know which button was clicked to submit the form. Is there any way to disable the submit button AFTER the form submission, so it would be included in the request?
show links when hover
hello there jquery gurus..i have another question to ask.. how can i achieve this in jquery.. when i hover my mouse it will show some link like the RSS, Permalink..just like in the picture..coz i want to add some delete option on my page ...please help me in solving this one..
load() makes call but doesn't return anything
Hello, I've been using jquery a year or so ago and then stopped. I'm now trying out something else and for some reason the simples load() isn't working. All I want to try here is to load the html from a URL into a div with id "visitenkarte". I can see in Firebug that the call is made, but in the response all i see is blank. This is all the code is. Can someone please tell me what's wrong? $(document).ready(function() { $("#visitenkarte").load("http://www.w3schools.com/tags/default.asp"); }); Thank
Finding li number in an ordered list
Hi all. Is there an efficient way (ie. not looping through all members and counting) to find out what number an li will get in an ordered list? For example: <ol> <li id="first">First</li> <li id="second">Second</li> </ol> Naturally #first and #second will be 1 and 2, respectively. Without looping though all children of ol and counting, can I determine the number for #first and #second? Thanks. -Jeff
How to correctly call a function from an event handler that will delete the event handler mid-flight?
Hi guys, I'm wanting a table cell click event to remove and replace the table it was clicked on, however I'm finding that as it's deleting the original table object the actual running event code is being replaced and the function is bailing. Any ideas how I can call the delete/refresh function from outside the event's function scope? Many thanks
Weird bug in ALL IE..
Hello, I'm having an odd problems that is happening in IE6, 7 and 8. What I have is a reel of images scrolling from left to right 100% of the page. It also has a hover function on it so when you over over the scrolling images it will pause the function right where it is then start up again where it left off. I also have it scroll to X spot on the page, stop for 2 seconds then start up again. This works in all other browsers besides the ugly IE family. What happens in IE is that if you hover over
conflict between plugins
Hello, I am an novice-intermediate jQuery and have good understanding of how to work with it. However, I came across something that I never experienced before where 2 wordpress plugins use jQuery and someone they cant co-exist together. When I disable one of them then the other works. The address is http://www.TorontoWebDesignExperts.ca/RHCC and I would really appreciate your help in fixing this problem. the two plugins are Cross Slider and cforms. Thank you, once again, for your help. Mr. Alexander
Why Ajax request, using the GET method, cannot be cached in Opera?
Please look at this small test: http://www.karapuz.by/media/js/ajax-GET-caching-test.html It seems that Opera (mine is 10.10), in contrast to IE, FF, GC, and Safari, is not caching the ajax response, even if it is explicitly told to do that. Any ideas?
Setting up an Ajax call
I'm trying to get a script to work similar to this one on the Sitepoint website: http://articles.sitepoint.com/article/ajax-jquery I have the following HTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link href="script/jquery-datepicker/datePicker.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"
Listing values of checked checkboxes
Hi everyone - I am working on a form with a huge selection of checkboxes (certifications), arranged in a table (#certs). To make it easier for the user to check what certifications they have selected, I would like to add a list immediately following the #certs table that updates dynamically based on their selections. I put a paragraph under the table with a span - ID certs_list. I was able to add to this with the following code, but if the checkbox is clicked multiple times, it keeps adding the
How to display bunch of <li> elements consecutively using .animate
I tried to enumerate through a index array to assign different ids to newly retrieved JSON data, the li element is initially set to be hidden and the hidden data can be seen from console. But the browser is failing to show the data when I tried to use ('li#a').animate({opacity: "show"}, "slow"); I also tried to use .animate right after each <li> appendTo the body and failed to show as well. I am wondering how to fix this? Is there any better way of handling this with out creating an enumerating array?
About jqGrid
Hi everyone, i ned to ask about the jqgrid, wich forum should i use, thx.
getJSON in firefox gives 'data is full' error
hi, recently i tried to use getJSON to retrieve data from http://search.twitter.com/search.json and every time i tested in firefox, the console will always give me error on the line $.each(data.results, function(i,result) saying data is null. i am wondering how to solve this problem?
Populate a form using json data
I have a few forms that are enclosed in tabs on a mega form and each is saved via ajax. I need to load existing data into the forms upon load via ajax rather than embed the data on load in the value attribute of each element. I am thinking there has to be a better way to generically handle the json data than this: $.each(data,function(name,value) { if( $("[name="+name+"]").is("input:text") ) $("input[name="+name+"]").val(value); if( $("[name="+name+"]").is("select") ) $("select[name="+name+"]").val(value);
Ok seriously, $.load() into a div and THEN get the height/width?
I've ran into this problem more than once, there are plenty of tutorials on how to toggle/fade a hidden div that already has data placed into it, but I want to $.load() a page into an empty div ID and then toggle/fade it into view. I can't for the life of me figure out how to do this or find anyone in Google trying to either. This has to be the first time I've ran into a limitation of jQuery and it isn't even something that should be such a problem.
Next Page