[jQuery] Stumped by AJAX and events
I am trying to use .get in a click handler to load some XML, as shown below. The handler will only work if I first call my getRecipients function in $(document).ready. I am really pulling my hair out with this. I can see in my Firebug console that the file request is being made via the click event, but it just flashes in the console and nothing else happens. Any help is greatly appreciated. Thanks, John <input type="image" id="btn_recipient_search" src="btn_search.gif" alt="Search" /> $("#btn_recipient_search").click(
[jQuery] Did anyone use jqmodal notice example ?
If anyone used the notice example dialog, can you guys please send the sample code. Thanks Gautam
[jQuery] a little help - getting data pairs into input pairs
I have some data: d1 = [[5,10],[10,15],[12,15],[15,18],[20,23]] and I have a table with text inputs: <table cellpadding="0" cellspacing="0" id="curveData"> <thead> <tr> <th>#</th> <th>Quantity</th> <th>Price</th> </tr> </thead> <tbody> <tr> <td>1</td> <td><input type="text" class="qty" size="8"></input></td> <td><input type="text" class="price"
[jQuery] Cappucino's FlickrDemo in 45 lines of jQuery
After reading about the release of the Cappuccino web application framework a few days ago, I thought I'd take a stab at re-implementing one of their demos in jQuery. Cappuccino is obviously a huge framework with tons of features, but I don't think jQuery can be dismissed quite so easily in favour of something so heavy. This took me about 3 hours. It's probably not perfectly optimized, and I took a few CSS shortcuts that only work in Gecko and WebKit. http://www.brokendigits.com/2008/09/05/cappucinos-flickrdemo-in-45-lines-of-jquery/
[jQuery] Filter based on width attribute
I am wanting to turn all TD tags, that have width="65%", into links, based on the tag text, when the page loads. I don't have access to change the HTML itself. I have gotten part way there, but have been unable to get the filter to work: [code] <script language="JavaScript"> $(document).ready(function(){ $("td").filter("width=\"65%\"").click(function () { $(this).replaceWith("<td width='65%'><a href='classDetails.php?class=" + $(this).text() + "'>" + $
Accordion madness troubles
Hi, I'm brand spankin' new to jquery, and to JavaScript, with some intermediate background with CSS. I'm using a variation on Accordion Madness from Learning jQuery ( http://www.learningjquery.com/2007/03/accordion-madness ) and I'm having some issues with nested DIVs. I'm trying to do this in Wordpress because I'm starting a movie journal of sorts. My test site is up at http://www.zenegg.org/popcorn I have FINALLY gotten the thing to work as far as the accordion animation and show/hiding each appropriate
[jQuery] Website Glitch
I noticed that the search icon sprite has its states 1px too close together--if you look closely at the bottom edge of the magnifying glass, you can just barely make out the top edge of the over state for this button (its a line of light gray). The site itself looks so great that this thing is driving me nuts! =)
[jQuery] Alternate colors of a list (<ul> <li>)
<div dir="ltr"> Alternate background-color of trs of a table is very easy with jquery, but, anyone knows how to alternate these colors of an list? <ul> <li>? I mean, alternate the colors of the <li>s of the list Thanks!</div>
[jQuery] Converting an interesting script function to jquery:
if(f = $('product_sort_'+p_nId)){ for(var i=0; i<f.options.length; i++){ if(f[i].selected){ var temp = new Option(f[i].text,f[i].value,true); if(p_nDirection == 0 && f[i+1] != null ){ f[i] = new Option(f[i+1].text,f[i+1].value,false); f[i+1] = temp; } else if(p_nDirection == 1 && f[i-1] != null ){ f[i] = new Option(f[i-1].text,f[i-1].value,false); f[i-1] = temp; }
[jQuery] firefox2 parsererror in jquery .ajax but not in browser
I'm trying to access an xml document via .ajax but it goes to the error handler... I get no properties in the errorThrown object, and the only clue I have is "textStatus" which tells me "parsererror" only. more clues: - if i directly access the xml document/request firefox can parse it fine and displays the raw xml - firebug shows headers and response document - content type correctly set - ie7/ff3 works fine Thanks in advance!
[jQuery] Convert MooTools to jQuery
Hi, I was using MooTools before and I'm kinda new to jQuery, I'd like to know how you would modify this to use it in jQuery, Thanks, - Israel window.addEvent('domready', function() { var Boites = $$('.Boite'); Boites.each(function(Boite) { var Lien = Boite.getElement('a'); Lien.addEvent('click', function() { var Boite = Lien.getParent(); var Contenu = Boite.getElement('div'); if(Contenu.style.display == "none") { Contenu.style.display = "block"; } else { Contenu.style.display = "none"; } }); var
[jQuery] Does anyone know what $('div.myclass img[src$=png]').click(function(){ $(this).parents('div.myclass').hide('slow'); }) does?
If you can, then I would shamelessly ask you to go to right way http://www.synacor.com/jobs and discover the kind of coolness that a career at our company offers! We are sorely in need of expert jQuery hackers and are recruiting for GUI Developer and GUI Engineer positions. Did I mention we have a 25 cent vending machine, movie popcorn maker, a sweet Ms. Vienna espresso maker with fresh beans delivered daily? Not to mention, an awesome office location right on the Buffalo, NY waterfront? Now, you
[jQuery] click() and dblclick(), sitting in a tree
I'd like to bind both events to a div, such that: When the div is clicked, Event A fires. When the div is double-clicked, event B fires. But not event A. The single-click event works fine. And the double-click works too, except both events fire on double-click. That is, immediately after the first click (of two), Event A fires.... Then on the second click of the double-click, event B fires... Is there a way I can separate the two events? ...Rene
[jQuery] "this" - Basic question
<div dir="ltr">Hi Folks I have: $(".tr").each(function(i){ $(this).bind("click", function(event){ var tr = $(this).html(); ..... My html is <div class="tr">my text please! <div class="w">I dont want this children</div> </div> I am trying select only "my text please!" without children(). I tried .remove() .not(".w") .not("div.w") and a lot of variations Look I am not working in the "document" I have this in "this" argument. so $(this).html() = my text please! <div class="w">I dont want this
[jQuery] The AJAX Experience
Apologies in advance for being a bit off topic. Is anybody out there attending TAE and looking for a roommate? An empty double bed really seems to be a waste... Get in touch--I've not reserved a room yet. Nathan Hammond
[jQuery] fix a few simple things
Hello, I have been playing with jQuery for the last month or so and was wondering if some one could help me out with a few issues I've been having... The test page is http://www.sjrmc.org/Scripts/jquery.ui-1.6b/demos/functional/Untitled-1.html The issues is the... if when the page loads and some one closes the top boxes the boxes below move up... that is a problem when you drag the bottom one close to the top then close the box the started off above it. It "last" box the was drug to the top now moves
[jQuery] MooTools to jQuery
Hi, I was using MooTools before and I'm kinda new to jQuery, I'd like to know how you would modify this to use it in jQuery, Thanks, - Israel window.addEvent('domready', function() { var Boites = $$('.Boite'); Boites.each(function(Boite) { var Lien = Boite.getElement('a'); Lien.addEvent('click', function() { var Boite = Lien.getParent(); var Contenu = Boite.getElement('div'); if(Contenu.style.display == "none") { Contenu.style.display = "block"; } else { Contenu.style.display = "none"; } }); var
[jQuery] How to apply jQuery to an item which doesn't exist when the page is loaded.
My PHP code creates a button which doesn't exist when my page is loaded. Hence, the according jQuery command doesn't work. How can I fix this? Thank you!
[jQuery] Autorefreshing DIV
Good morning all, I have a requirement to automaticly refresh a DIV with some content from another URL every couple of seconds and was hoping to get your opinions on how this is best handled. For instance, I have a div which looks like this: <div id="my_refreshable_div"> </div> I dont need a full blown AJAX call as I simply want to fill this div with the content from a remote file every few seconds, for instance. / some_folder/my_div_content.html. I've currently got a working Spry (sorry for swearing)
[jQuery] need help with $.post with callback function in submit button
Is there any difference between $.post with callback function in a submit button vs a regular input button? When my submit button tries to post and get the callback result it never happens. Thanks!
[jQuery] Triggering a click
I've got some html that looks like this: <div class="awardheading"> <img class="plusminus" src="/images/plus.gif"> Some text here. <a class="nominatelink" href="#">Make your nomination.</a></div> <div class="awardnomination"> This is award info </div> A click on the plusminus image shows/hides the awardnomination div. That's working. I also want a click on the nominatelink to trigger a click on the image...since I've already got that working. I thought something like: $(this).parent().next('img').trigger('click')
[jQuery] MooTools to jQuery
Hi, I was using MooTools before and I'm kinda new to jQuery, I'd like to know how you would modify this to use it in jQuery, Thanks, - Israel window.addEvent('domready', function() { var Boites = $$('.Boite'); Boites.each(function(Boite) { var Lien = Boite.getElement('a'); Lien.addEvent('click', function() { var Boite = Lien.getParent(); var Contenu = Boite.getElement('div'); if(Contenu.style.display == "none") { Contenu.style.display = "block"; } else { Contenu.style.display = "none"; } }); var
[jQuery] Slidemenu + Image Problem
Hi there, i've a slidemenu panel, and when i put some image inside this panel, or add a background-image, the links inside don't work, the images don't show and the input doesn't seen to work, it seens there is something over those objects, someone can help-me? P.S.: It works fine in FF an IE7, only in IE6 that doesn't work, and another think, i'm brazilian, PT-EN!! <script type="text/javascript"> $(document).ready(function(){ $(".btn-slide").click(function(){ $("#painel").slideToggle("slow"); $(this).toggleClass("active");
[jQuery] Store JSON object in cookie
If you try and store and retrieve a JSON object in a cookie using the cookie plugin (http://plugins.jquery.com/project/cookie), you get an unexpected result. For instance, save into cookie: $.cookie("mydata", {foo:"bar",baz:1}); Retrieve value: var mydata = $.cookie("mydata"); But that returns [object Object] A json parser (e.g. http://www.json.org/js.html) has to be used. Using this script, you can 'stringify' the object before storing it: $.cookie("mydata", JSON.stringify({foo:"bar",baz:1})); Then
[jQuery] computer
Offers ME and Ph.D. programs. Contains online documentation, technical reports, personal homepages, and events information. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ http://www free webs.com gallerieis/ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
[jQuery] jQuery test suite on new Google Chrome browser
Hi, With all the buzz around the new javascript engine in Chrome, I decided to run the jquery testsuite ( http://jquery.com/test/ ) on my 3 installed browsers (ff3, ie7 and chrome, on wixp sp3) ====================================== IE7: Tests completed in 49734 milliseconds. 0 tests of 1270 failed. FF3: Tests completed in 31710 milliseconds. 0 tests of 1270 failed. Chrome: Tests completed in 28212 milliseconds. 2 tests of 1270 failed. ====================================== Even though, Chrome seems
[jQuery] jQuery under Konqueror
Hi ! When I open jQuery homepage site under Konqueror i see something like that: http://jan.koprowski.zhr.pl/jquery_konqueror.png Even demo script doesn't work. Why ?
[jQuery] blockUI styling question
I'd like to accomplish a couple of things with BlockUI. I suspect these can be done by changing styles and other settings but I haven't been able to achieve the desired affect. 1. I want the mask to be transparent. IOW, the user should not be aware of the overlay, but also shouldn't be able to interact with the page during blocking. In some cases my blocking is very short. Some users have commented "What was that?" What background color and opacity settings would I need to achieve this? 2. I'd like
[jQuery] Find / traverse to next node matching a criteria?
Hi! Is there any feature in jQuery to find the next node matching a criteria, regardless of that next node a sibling or not? I know there is "next(<expr>)" and "prev(<expr>)" methods, but this only works for sibling. I specifically need to have something to look into siblings and non-siblings. The algorithm will probably look like this: (a) for each subsequent siblings, check if that sibling match the criteria, if not, traverse down to find first tree match the criteria, (b) failing that, go up to
[jQuery] Calling/forcing hover()
Hi, is there a way to directly call the hover() or mouseover event ? I know I could use a separate function as the parameter but what I need is to trigger the hover event on my selected element, much like I can force the click event by writing something like $(elm).click(); in that case the click applies without user interaction.
[jQuery] IE6 click event known bug?
<div dir="ltr"> Is there a known bug in IE6 about binding click event to elements that were added dynamically to HTML? I can't get this working, though it's working in IE7, FF3, Opera and Safari.<br clear="all"> Thanks -- <a href="http://jquerybox.com">http://jquerybox.com</a> - jQuery forum </div>
[jQuery] Tootip on multiple elements with same id
I have a php page where retrieve rows from a table. Eeach displayed row shall have a tooltip with some info about that content. I use http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ There can be many rows on the page and everyone will have a span with id="tooltip". I initialize tooltip with the following statement: $("#tooltip").tooltip({ track: false, delay: 0, showURL: false, fixPNG: true, extraClass: "pretty", top: -15, left:
Help redirecting to another tab
Hello. Jquery is awesome but i got one challenge here. I have a page(main.aspx)with several tabs on which load other pages like this <li><a href="default2.aspx"><span>Bolig Info</span></a></li> <li><a href="gridTest.aspx"><span>Bilder</span></a></li> <li><a href="documents.aspx"><span>Dokumenter</span></a></li> etc... i have some sql work going on documents.aspx tab. After SQL work is done i need to refresh this tab. i have tryed in C# code behind to write like this Response.Redirect("main.aspx?objid=17694725#ui-tabs-11");
[jQuery] Plugin developement
Hi @ all, i have a problem with the understanding of public methods of an plugin. Specialy how to create and link them to the plugin. For example: <code> ;(function($) { $.fn.pluginname = function(options) { var _options = $.extend( { label: "data", debug : false }, options || {}); return this.each(function() { // this works, of course _doSomethingPrivate(); // this too var data
[jQuery] Plugins fighting one another?
I'm learning this technology so apologies if this is trivial! And apologies for the large code snippet that follows. My page, typical of most, has a navigation in <div> list items determine what is shown in the main <div> alongside it. Content is filled each time by a ajax call to provide either a SQL query result set or plain text from a file. I use the *excellent* livequery plugin to control the click event on the list items and I am trying to use the flexigrid plugin (whih I think will be excellent)
[jQuery] form plugin and a progress bar
Hi :) what I am trying to do is a file-upload form that uses ajax (and so I'm using the form plugin) and that shows a progress bar while uploading. I've tried many solutions that I found over the internet but none seemed to work. possibly I am making mistakes somewhere in the process. question is: is there a way to get the data I need? (i.e.: the temporary file size) the server is running php 5.1 could anyone please help me? for example, see this: http://t.wits.sg/misc/jQueryProgressBar/demo.php
[jQuery] jeditable questions
Hi guys I've been trying to implement Mika Tuupola's Jeditable plugin, but found a couple of things not working, presumably not bugs but my own mistakes during implementation, I've -unsuccesfully- tried to solve them by myself, and couldn't get an aswer from the plugin developer, so I'll hope somebody in the community can help me. - I can't style the form element at all, I mean when you click the editable text and it is transformed into a textfield/textarea, it has a plain style, I'm unable to customize
[jQuery] Need help making a menu appear next to the users image....
Hi I have a website that I am currently working on. I have user's to upload images and select which image is default. I want to make the user able to when they have the mouse over the image to have a menu next to the image fade in. Now the problem. I tried with hover and then tried using mouseover functions. The problem is when the user puts his mouse over his image it would fade in a menu but when you move your mouse to put it on the menu it fades out. I don't know what to do. I notice since I made
[jQuery] each() odd behavior
Hello. I'm trying to make external links open in a new window but the each() seems a little strange. Am I missing something in the code below? Because "this" gets the "href" attribute of the element, instead of getting the current element itself. The strangest of it all is when I run this snippet right into firebug's console, it works! And when I place it into my jQuery scope, it doesn't. $('a[rel*="external"]').each ( function() { $(this).click ( function() { window.open(this.href); return false;
[jQuery] Need Simplest Ajax
Hello all, I'm new to JavaScript and jQuery although I have been learning for a couple of weeks now but still can't wrap my head around the programming this kind of stuff... I'll basically post my HTML below and explain to you what I need and where I am stuck. Thank you for reading! Okay, So I have a basic index.html here: <div id="navigation"> <a class="current" id="index" title="Home" >Home</a> <a href="contact.html" id="contact" title="Contact">Contact</a> <a href="#" id="Misc" title="Misc">Misc
Next Page