.Ajax unable to find url
Hi guys, Been stuck with this problem on my ajax request Here is the scenario. Im using this script for searching items once it finds the items. it displays the items on this div container #dataTable, This items contains multiple forms with unique ids After that ive binded $(".measurement_submit").click(function() on those forms. Ive binded it successfully because it retrieves all the fields in each form. However it wasnt able to access the url. Ive used firebug if its pointing to the correct url.
[jQuery] cluetips only loads the first tip but not the rest
This is what I have in the head: <script type="text/javascript"> $(document).ready(function() { $('a.tip1').cluetip(); $('a.tip2').cluetip(); $('a.tip3').cluetip(); }); </script> In the body I have: <a class="tip1" href="#" title="Host Team" rel="mylink1.html">learn more</a> <a class="tip2" href="#" title="Host Team" rel="mylink2.html">learn more</a> <a class="tip3" href="#" title="Host Team" rel="mylink3.html">learn more</a> It only loads the first tip, if I switch tip2 to the top where tip1 is
[jQuery] Ajax - Access data arguments in callback
Hello, Is it possible to access the data arguments that are sent with the ajax function? Example: $('#mycheckbox').click( function() { $.get( '/ajax.php', { nr: this.id }, function( data, textStatus ) { // Here I want to access the arguments I just sent with ajax.php // As example, something like this: $('#'+arguments.nr).attr('checked', 'checked'); } ); return false; } ); I could easily do $('#mycheckbox').attr('checked', 'checked'); but that is not what I want.
[jQuery] ID naming conventions and $.scrollTo()
I was peaking around on the W3C site to see if I could find a clear definition of which characters are allowed within an ID. The problem is that I have a series of divs that have id="aq-1234" "cd-456" etc. I have no real control over the - in the name. What would be another way of clearly identifying an object without the id? <td id="aq-1234"> is what I have now. I've not used the rel="xxx" that I see some people use. Would that be acceptable? Clearly $("#aq-1234") is not. Any suggestions? Thanks
[jQuery] Ajax parsererror
I am attempting a fairly easy ajax call within a zend framework, but am getting a parseerorr. I have validated the xml and will show that below. No js errors are being thrown. The ajax call: $(function() { $('#AjaxListAnchor').click(function() { $.ajax({ type: "GET", url: "/xml/index/messages", dataType: "xml", error: function(XMLHttpRequest, textStatus, errorThrown){ alert('Error loading XML document\n' + textStatus); }, success: function(xml) { $(xml).find('message').each(function(){ var message
Checking img src
Hello I am trying to add a class to a div depended if another div has an img with a specific src $p(document).ready(function() { if ($("#Banner img").attr("src", "http://test.gif")) { $(".top").addClass("right"); }; }); What am I supposed to do?
If the URL is something, do something
Hi, What I'm trying to do is create three rules depending on the path of a page. If the path contains 'best-sellers', I want jQuery to set the class of the page to 'pm-best-sellers'. I can do this, and it works, but when I add the rules for 'express-gifts' and 'eco-friendly' it breaks. Here's what I've got: $(document).ready(function() { var url = location.pathname; if ("url:contains('best-sellers')") { $("body").attr("class","pm-best-sellers"); } else if ("url:contains('express-gifts')")
onmouseover style effect for entire div
I want to fade in a background image when the mouse runs over a div and make it disappear when the mouse exits. I was looking for sugestions as how to best achieve this as I've found the onmousover and onmouseout solution to be pretty crap (ok for a single element like an image or something) for elements that contain other elements. just wondering if there is a solution using JQuery? Cheers
jquery nested tabs not working
Here is the full sample script which demonstrates the problem, inner tabs company/department come up as list instead of tabs I have already tried what People have suggested that inner tabs should also be tabified via jquery but it doesn't work all the examples I have seen e.g. http://cse-mjmcl.cse.bris.ac.uk/blog/jQ ... ested.html use topmost div for jquery tabs call. Code: <html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> <script type="text/javascript"
[jQuery] Browser Stop call's ajax.Error
Hi, I've noticed that when I click the Stop button on the browser, or navigate to another page, jQuery.ajax calls the error event. You can see the problem live at: http://www.pingmyport.com/ Code: this.getJson = function(timeout) { if(this.XMLHttpRequest) this.XMLHttpRequest.abort(); this.XMLHttpRequest = $.ajax({ complete: function(){$("#kitLoader").hide();}, data: { Address: him.Address, portNum: him.portNum, portType: him.portType }, dataType: "json", error: him.serviceUnavailable, success: him.processJson,
[jQuery] Multi Combined Selectors
hi all. i'm new here and i hope posting in right place. I'd like to ask if and how I can add multicombined selectors like: $(this).parent().parent().$("input:checkbox[class='list']").attr ('checked') I know that the $("input:checkbox[ppb='list']") isn't right but i just want to show you what i want to do. I'm already inside a selector: $("input:button[name='delete']").click(function() { if ($(this).parent().parent().$("input:checkbox[class='list']").attr ('checked')) { //dosomething } }); is this
[jQuery] is there a JQuery solution for multiple sticky tooltips?
Hi, I'm trying to find a tooltip solution that allows for the display of HTML elements as tooltips, with following specific behaviours: -tooltips popup on mouseover; disappear on mouseout -tooltips can be made sticky + draggable on click, and can be closed with a 'close' link The first requirement is met in most tooltip libraries: only one tooltip is shown at a time, content can be picked up from other HTML elements on the page, and tooltips disappear on mouseout. The second requirement is often
[jQuery] Show div as overlay with jdialog
Hello Im a beginner in jquery and search for a solution to display a overlay- Window. (ModalDialog, ModalPopup) I found the jdialog-extension: http://www.gimiti.com/kltan/demo/jDialog/1.1/test.html Looks very good, but i can't declare the overlay-content in a separate file. Instead i like to declare the overlay-content in the same page where it's called from. (asp.net-Eventhandlers etc) Is that possible or do you know another approach / another extension? Thx
[jQuery] asynchronous validation + BabySteps
Hi, I am struggling a bit with this. I am using the 'jQuery BlockUI Plugin' and the 'BabySteps' plugin (http://blog.vokle.com/index.php/ 2008/08/22/babysteps/) where I go from step to step if the previous step validates ok. I have (simplified) code like this: step1.bindStep(step2, { nextValidator: step1_validator, transition: function(currStep, nextStep) { currStep.slideUp(); nextStep.slideDown (); } }); function step1_validator() { $.ajax({ url: "../a/b", type: "POST", dataType: "text", data: {
changing values in a table column
I need to write to table cells in a given column. To illustrate: <table id="tableName"> <tr> <td id="col1">some value</td> <td id="col2">some value</td> </tr> <tr> <td id="col1">some value</td> <td id="col2">some value</td> </tr> </table> I'd like to be able to change values in one column or the other. Can someone provide me with the jQuery conventions for iterating through rows and writing to table elements, or otherwise point to a good source of information? I've looked around
[jQuery] tooltips not working on content loaded via ajax
I have some simple tooltips on my site that load the content of the "title" tag into the tooltip. I am currently using this plugin http://cssglobe.com/post/4380/easy-tooltip--jquery-plugin but I have tried several others. They all work fine for static elements, but the main content of my pages are loaded by an ajax load() call. The tooltips don't work on any this content loaded via ajax. Why is this happening and is there a way to fix this? Or maybe a tooltip plugin that will work for this?
.each() ... why, whats the benefit?
Hi Guyz and Galz, I'm a beginner, actually a designer but really enjoying this stuff. Question about the .each() function. Whats the difference between these: $("li").click(function () { $("li").each(function(){ $(this).toggleClass("example"); }); }); and $("li").click(function () { $("li").toggleClass("example"); }); They do the same I am obviously missing something, but why would you want to use .each() what's the benefit.
[jQuery] Autocomplete onItemSelect issue
Hi all, I'm using a modified autocomplete from http://www.pengoworks.com/workshop/jquery/autocomplete.htm and am having some issues using the onItemSelect option. It works, but seems to be calling the function once when autocomplete is called to during $(document).ready. In the code below, focusFirst is called when the document loads as well as when an item is selected. This doesn't seem like a desirable behavior. Does anyone know why this is or how it could be remedied? Thanks for any help anyone
jQuery .getJSON first load is shaky (using callbacks)
Hey All, I've been experimenting with a filtering system using jQuery, PHP, and JSON. I've got it all working with transitions however when you first click one of the "filters" (click "FILTER BY LOCATION" then "Provo, UT") it loads the data correctly however it doesn't hide the "loading-div" before showing the appended "properties-div". The callback is arranged correctly. Currently it's in another function however it works the same way when inserted under the .getJSON block. After the first click
[jQuery] Need to modify function to change buttons location
Need help to reposition buttons to a particular DIV within a pageBreak and Table. Right now, it's simply placing the buttons under the table. Can anyone help me figure this out? Erik function setButtons(pageBreak){ for (var i = 0; i < pageBreak.pages.length; i++) { for (var j = 0; j < pageBreak.pages[i].childNodes.length; j++) { if (pageBreak.pages[i].childNodes[j].nodeName == "TABLE") { var table = pageBreak.pages[i].childNodes[j]; var
FadeIn images
Hey; i'm actually searching a way to make the images on my site appearing in a fading effect. I tried to do it by myself with no succes. I tried some plugin like InnerFade or Cycle, there are nice and let you fade betweens pictures. But none let you FadeIn the first images on load… So if someone can tell me how to do that (or point me to a plugin) it would be very nice.
Effect whenever a link is clicked
I have navigational links on my page, but when someone clicks one, i would like an effect to occur, and then the browser to navigate to the link and it usually would. So far I have: $('a').click(function(event) { $("#box").children("div.nav:visible").hide("blind", {}); // HERE I WOULD LIKE THE LINK TO GO ON });
Trigger event only after previous has completed
I want to sequence a few animations of different selectors. Normally, if it's the same selector, I could just add it to the list, but they're different selectors. So i have: // Slide in the main content box $(".main").show("slide", {}, 1000); // Slide down the services submenu $("#servicesbar").show("blind", {}); How would i trigger those in sequence?
[jQuery] How to get mouseover and mouseout action to take place after changing div with jquery post method
Hi: I added mouse in and mouse out affect like this in $ (document).ready function $(document).ready(function(){ .... $(".StripMe tr").mouseover(function(){ $(this).addClass("over"); }); $(".StripMe tr").mouseout(function(){ $(this).removeClass("over"); }); .... } My question is if i used jquery post method to change some div content, than this new div won't have mouseover and mouseout affect anymore, is there anyway to achieve it. Is that needed to trigger ready function again? Another question
[jQuery] How do I extract a part of received data
I explain... I try to load only a part of my data file (named Elements.html). It will load all the data file with var elem = $(data); I am unable to load only a section of this file if I use var elem = $('#section_news', data); Could you please help me find out what part of my code is incorrect? Thanks Here is my code $.get("Elements.html", function(data){ // get id section_news for the receive data var elem = $('#section_news', data); $('#content').empty().append(elem); }); My host html <body> <div
[jQuery] How do I extract a part of received data
I explain... I try to load only a part of my data file (named Elements.html). It will load all the data file with var elem = $('#section_news', data); I am unable to load only a section of this file if I use var elem = $('#section_news', data); Could you please help me find out what part of my code is incorrect? Thanks Here is my code $.get("Elements.html", function(data){ // get id section_news for the receive data var elem = $('#section_news', data); $('#content').empty().append(elem); }); My host
[jQuery] Simple CSS selector Question
Hi, I am a beginner in Jquery who simply set up the configs and start exploring.please help me in following. I have starter kit html page. <form> Form 2 <input name="bar" value="YYY" /> <input /> </form> <p class="stuff">Okie this is hiding example In script tag following things do not take effects 1. alert($("input[@name=bar]").val()); - it suppose to alert the value of this input. 2. $("p[@class]").hide(); - My understanding is inner tag should get hide
[jQuery] Context querstion
Why is the context of this one the document: $('div.layer').find(':checkbox') or $('div.layer').eq(0).find (':checkbox') and at this the div.layer $($('div.layer').get(0)).find(':checkbox')
[jQuery] AJAX: Display raw XML Document
I'm re-writing a test page for a RESTful web service with AJAX, and need to be able to display the XML or JSON response in a textarea or a div. I'm re-writing the web page to work off jQuery, but I'm stuck here. The best response I can get is: [Object XMLDocument] I have to set a custom Authorization header, set an HTTP method (get, put, post, or delete), send data, and display the raw XML (or JSON, depending on the request) response in the page. With firebug I see the XML response is there, but
<Solved> jQuery Ajax with JSON problem
Hi all, I've used jQuery for a while and I've done a fair many ajax requests with JSON and have always been able to figure out my problems. This time around I'm stumped, I haven't figured out the problem. Here's what I'm doing, I have an ajax post request that happens on a change event of a select box. The AJAX request gets information about the client to pre-populate some data fields to accelerate the data entry process. The request receives the data back in a JSON format which I then access to
[jQuery] jQuery PDF Viewer?
I'm looking for something that can display a PDF in a way similar to a typical jQuery image gallery (or a desktop PDF viewer, e.g. Acrobat or Preview). I tried out Mike Alsup's jQuery Media Plugin (www.malsup.com/jquery/media/), thinking that the "iframe player" might do the trick. But of course, I still get the default browser behavior for a PDF, which in most cases (like Firefox) is to not display it at all. Works great in Safari, though, especially with the AdobePDFViewer.plugin. So does anyone
[jQuery] detecting jQuery objects && "constructor" property
Hi, When I create a jQuery Object, it's known by javascript as an object, and it behaves like a function. In some cases, I have to check if a variable is a jQuery object or not. Usually, to check a variable type, I use the "constructor" property (when I can't use typeof, which is not accurate). In case of jQuery, the constructor property equals Object, so I can't is it. Would it be possible to change this, so I could get for example : $([]).constructor === jQuery This would be great, no ??
[jQuery] link to images from web root
I am adding a lightbox script that has images for the buttons. I will want to use this script in more than one location, so I want to put the scripts and the images in a central location. The script calls for the images to be in the same folder that is calling the script, and I want the images to be located in the folder where the included scripts are located. This way I know where the images are located, and they are in the same place for each page that I use the lightbox script for. I hope that
[jQuery] Disabling jCarousel Image Selection
I've encountered a minor but annoying bug in jCarousel. 1. Go to http://sorgalla.com/projects/jcarousel/examples/dynamic_javascript.html 2. Double click the right arrow button. 3. Notice some of the images and middle section get the selection "highlight". It's almost not noticeable in this simple example, but in more complicated examples it gets very annoying. How would you disable the select-on-double click feature for the jCarousel widget? I've tried doing: $('#myCarousel').bind('dblclick', function(){
[jQuery] jquery validation plugin issue with IE 8
I have a problem with the validation plugin when I add a new validation method in IE8, when I submit the form it just validate the added method but the other fields are submitted anyway. Also I have another problem with the valid() function, when I try to see if the function is true to show a confirmation message IE8 show the javascript error: 'settings' is null or not an object Line: 788 Character: 3 There is the way I add the new validation method: <script type="text/javascript"> $(document).ready(function(){
UI tabs, overflow above instead of below
Hi, I'm using the JQuery UI tabs to cut a complex form into pieces but I was wondering if and how you could "reverse" the rows when your tabs overflow the available width. It's visually nicer (and ergonomically more familiar) to have overflowing tabs above the last complete row of tabs and not below (the standard floating behavior), so that a full row of tabs is closest to the content container and not that one or two "tabs too many" (like an hourglass but from left to right, row by row). I haven't
Can i have the Accordian closed when first viewing the page?
im using some accordian jquery code and the accoridian is open when i view the page.... is there anyway i can have it closed and i can click to open it im using this code: window.addEvent('domready', function() { var status = { 'true': 'open', 'false': 'close' }; //-vertical var myVerticalSlide = new Fx.Slide('vertical_slide'); $('v_slidein').addEvent('click', function(e){ e.stop(); myVerticalSlide.slideIn(); }); $('v_slideout').addEvent('click', function(e){ e.stop(); myVerticalSlide.slideOut();
multiple tab blocks
Hi All, I have a small issue with tabbed pages. I am dynamically divs containing 3 tabs within a page. The number of divs created depends upon the DB table content. When creating ONE div all is well and the tabbing functionality works as expected. However with 2 or more divs (that is to say 2 or more sets of 3 tabs) the tabbing functionality breaks down since when one tab is clicked – say tab 'A' – all the other tabs 'A' in the other divs will also get selected. How can I replicate the same tabbing
IE caching JSON from a Coldfusion Remote CFC
Hi, Here is my problem. I'm using jQuery $.ajax or $.getJSON on document.ready to access data from the server through coldfusion remote cfc files. My url looks something like this for the main page www.website.com/index.cfm?action=add&id=2 when i go to a new page i.e. www.website.com/index.cfm?action=add&id=4 the ajax functions are called but are not collecting new data (only in IE). IE caches the response and wont give me a new one unless I refresh the page, which I don't want to do. here's an example
[jQuery] unsibscribe without google account
Hi, I'm trying to unsubscribe from this mailinglist and from the developer mailinglist. It seems, that I need a google account for that. Actually I wasn't planing to create a new account just to unsubscribe from two mailinglists. Is there another way? Christof
Next Page