[jQuery] How to bind to multiple elements
Hi! Well, i'll quickly describe my problem. In a page, i've multiple occurrence of: [code] <div id="images"> <div id="imagencap" style="float:left;"> <img src="fileName.jpg" /> <p id="caption_id"> caption_text </div> </div> [/code] I would do, that when i click on a "caption_text", the relative paragraph tag hide, and a textarea appears, with the text of the . Then, i've scripted this: [code] $("#images").find("#imagencap")
[jQuery] Correct viewport height?
When I use $(window).height() with Dimensions 1.2, it doesn't give me the height of the viewable part of the document. Instead I get the same number as for $(document).height(), i.e. the total height of everything in the document, including off-screen parts. Is this a bug or am I using it wrong? I get the same behavior on Firefox 2 and IE7. How do I get the height of the visible part of the document with jQuery?
[jQuery] Livequery not binding on div after a .load method
<span class="Apple-style-span" style="border-collapse: collapse; "><div>I'm sure this isn't a bug. Here's the node I'm trying to grab -- </div><div> </div><div><div id="pagetitle" class="TEST FOLDER!!!"></div></div> <div> </div><div>The objective is to set the page title to #pagetitle('s) class attribute's value - the node has no text and is delivered at the beginning of each new page brought in through a .load ajax method</div> <div> </div><div>The function seems to only fire on the initial page
[jQuery] New delegate plugin: event delegation with submit/reset cross-browser
Hi all, I needed to use event delegation for submit/reset events, so I took the solution from http://www.danwebb.net/2008/2/8/event-delegation-made-easy-in-jquery (see Yehuda Katz's comment) and enhanced it with workarounds for IE where these events do not bubble up. Also in Safari 2 submit doesn't seem to bubble either. Plus there were some quirks when confirm() was involved. Get it here: http://stilbuero.de/jquery/delegate/ I needed to do that quickly, thus the code could use some optimization
[jQuery] this pointer in Jquery ?
Hello for the moment to submit a form ,i do like this (the a href is wrapped in a form tag) <a href="javascript:$(".ok").parent('form').submit();" class="img ok"></a> but i would like to do like this <a href="javascript:$(this).parent('form').submit();" class="img ok"></a> as this doesn't work i would like to know if there is a syntaxe for this
[jQuery] My jQuery Page
Hi ppl, Came across jQuery recently. What I saw got me very excited. sid-deswal.110mb.com Please check the 'Bugs and Fixes' link on the page. If you know how to resolve them, a post back or an email would be very appreciated. Homepage checked on FF, IE 6, Opera and Safari (Win XP SP2, 1024x768) Regards
[jQuery] AJAX get method problem
I intend to have a poll page which user can switch between poll and result, triggered by clicking on a centain link, which is returned by GET method. now I am stuck because both function works on the first click, but when user try to click on the returned link, corresponding click event is not triggered, ie. poll -> result -> poll is broken on second step, and gives no javascript error. data returned is correct, so it should be something wrong with my code. $('#view_poll').click(function() {poll_id
[jQuery] Cycle plugin not working on IE and Safari
Hails! I've been having a trouble with a custom effect on IE and Safari, but it works perfectly on Firefox, although Firebug shows the following message: "[cycle] unknown transition: custom". It's not a error message, but I believe it has something to do with the bug in IE and Safari. Then, I tried turning the custom effect into a transition definition as the described in the Cycle documention (http:// www.malsup.com/jquery/cycle/adv2.html) and now it works in the same way on Firefox, but without
[jQuery] jcarousel and issues in Safari
Hi there, Does anybody use jCarousel successfully in Safari? That great plugin works perfectly in IE an FF but I'm having trouble making it work with Safari. First, Safari was freezing and giving an error message, something like "A script on the page blabla is making Safari unresponsive". I've updated to version 0.2.3 of jcarousel [1], and also put the javascript under the css declaration as advised in [2]. Now I get no error message, but the carousel still won't work: no automatic rotation and clicking
[jQuery] [validate] need help with addMethod
Trying to add a new validation method to check a yes/no set of radio buttons: My method: $.validator.addMethod("checkyesno", function(value) { if (value == 'Yes') { return true; } else { return false; } }, "You must read and agree to the terms and conditions before proceeding."); My rules: rules: { terms: {required: true, checkyesno: true} }, But so far have not been able to make this work... What am I doing wrong?? Thanks! Jim
[jQuery] Custom Build
<span style="font-family: trebuchet ms,sans-serif;">Are there instructions somewhere of how to make a 1.2.3 jQuery build without the effects (slideDown, FadeIn, etc)?</span><br style="font-family: trebuchet ms,sans-serif;"> <br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">Thanks,</span><br style="font-family: trebuchet ms,sans-serif;"><br style="font-family: trebuchet ms,sans-serif;"><span style="font-family: trebuchet ms,sans-serif;">Glen</span><br
[jQuery] What's deprecated in this suckerfish code?
I know about the superfish plugin, but I found some older, much lighter code here: http://be.twixt.us/jquery/suckerFish.php The funny thing is, when I copy the exact page and his 2006-era copy of jQuery to my local dev, it works like on his page. If I replace the jQuery with a modern 1.2.x copy, it doesn't work. I know the document.all is just a simple IE-only hack, but no matter what I try, I can't make it work even in FF with a modern jQuery. Can any of you gurus/folks with fresh eyes see the problem?
[jQuery] Toggle the sticky clueTip open image
Karl; excellent job! I'm new to jQuery and have been on a crash course for the past week in an attempt to implement it for an enterprise web app. As the UX guy, I normally don't get too deep into coding, but I also need to make sure what I choose will work well and be extendable for updates. My question(s) are thus: Q 1: I can't seem to get the close button to work when I use the sticky clueTip (#8 click to activate) on the demo page. I know the link that opens the clueTip also closes it, but I was
[jQuery] [ANNOUNCE] New Twitter Account for jQuery Project
In an effort to maximize the reach of announcements about upcoming jQuery updates and releases, the team has created a new Twitter account: https://twitter.com/jquery I urge you to follow the account, along with the mailing list, for updates and news. Please note that we may not follow all accounts and will be using this primarily as a notification tool. Rey jQuery Project Team
[jQuery] [SITE] Twitter
Yep. Just noticed that Twitter is now using jQuery v1.2.3 With that said, I just created a new Twitter account for the jQuery project: https://twitter.com/jquery Be sure to follow it as we'll use this as a vehicle for new updates. Rey...
[jQuery] Ajax loading/please-wait image
Hi, I want to add your typical 'Loading' animated gif to a page while it's updating via ajax. I'm trying to do this in the $.displayCal function below. The $('div#load-wait') element is a div with the img inside. When the page initially loads, I don't see the image at all, even when $.post takes awhile to load. I see the image if I comment out $ ('div#load-wait').hide(); The problem, I'm guessing, is that the image is being hidden before $.post has a chance to finish. I know there's an easy solution
[jQuery] ie still stalling at html rewrite
I hope someone more experienced can tell me where I'm going wrong with this? I have PHP generate the jQuery for an .html() rewrite of links, replacing the less-jazzy non-javascript show/hide alternative. It works like a charm in FF, but ie refuses at this point & will not go any further. The error occurs, apparently at this point in jQuery source: (elem,"select")))return;if(elem[0]==undefined|| jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else but I don't know what that means! My generated
[jQuery] Problems using dialog in blockUI plugin (vs 2)
I just 'upgraded' to blockUI vs 2, and for some reason the following code isn't working. It blocks the page, but everything shown is the blockUI defaults, not my custom dialog, etc. It works fine if I don't use the message: and css: syntax (i.e. I just put the dialog as the parameter). jQuery("#setDefaultLink").click(function () { jQuery("#defaultUrl").attr("value", jQuery(this).attr("href")); jQuery.blockUI({ message: jQuery('#confirmDefault'), css: { width: '275px',
[jQuery] [validate] validation doesn't work for radio buttons associated with hidden field
Hi, the problem i have is that I have a group of radio buttons associated with a hidden field like this: <input type="hidden" name="data[User][gender]" value="" id="UserGender_" /> <input type="radio" name="data[User][gender]" id="UserGenderF" value="f" /> <label for="UserGenderF">Female</label> <input type="radio" name="data[User][gender]" id="UserGenderM" value="m" /> <label for="UserGenderM">Male</label> and I have the following validation rule for the element: "data[User][gender]":"required"
[jQuery] Ajax, XML, and an Axis2 Web Service
I'm using jQuery to call an Axis2 web service with the following code... $(document).ready(function() { $.ajax({ type: 'GET', url: '/ecmsws/services/ecms/getChannelSectionLinks', data: 'articleId=7661', dataType: 'xml', success: getResponse }); }); ...the web service returns an xml representation of the server side object. This works in FF, Safari, and IE 7, but hangs IE 6. Any thoughts? -- View this message in context: http://www.nabble.com/Ajax%2C-XML%2C-and-an-Axis2-Web-Service-tp16809069s27240p16809069.html
[jQuery] Switching input type
Hi guys, I have a form input that displays "Enter a password" (value="enter a password"), which when in focus I would like to convert to a password field. I'm looking for something like this: <input type="text" value="enter a password" onFocus="hidePass()" /> to <input type="password" /> I've tried following the API, but I still get "uncaught exception: type property can't be changed" error in Firebug. Any help would be much appreciated. - Samuel.
[jQuery] Printing a list of links from a blog
This might not be possible but worth asking. This is the concept: I would like jQuery to print a list of blog entry titles inside a div that gets the contents from a WordPress blog. The link in the div, when clicked, must take the user to the blog entry - not to mention that the list of links inside the mentioned div must dynamically updated as the content of the blog changes. Is this possible? Thanks
[jQuery] Ajax Jquery PHP Echo Ampersands HTML Anchor Tag Issues
Hello, I am trying to echo fragment of HTML from a PHP page. The code goes as follows: The URLs that are being generated is a part of a custom framework that we use. So the main.php?page=config_detail means that I go to main.php which redirects me to a page called config_detail.php. Code that has the anchor to the page generating the XHTML fragment: <a id="all_data" name="main.php? process=spec_run&app={$sItem}&all" style="color:#FFFFFF;"> view all </a> So this goes to a page called spec_run
[jQuery] broken image url check options on jquery
Hi all, For awhile now I have used a simple onerror check to show an alternative if an img url is broken in the page. Something as shown below. Problem with this script, it will produce an error if the alternative image is actually not available as well. Can any one point me to a jquery solution if available? I was thinking I could probably use the dimensions plugin, get the width of any image on the page and if the width is 0 display the alternative missing image. <html> <head> <script language="JavaScript"
[jQuery] help with toggling classes(!)
I'm not sure if "toggling classes" is the right way to describe what I'm having trouble with, so let me explain a little... If you look at the example page here: http://www.cement-site.com/menutest/test2.html Here are the behaviors: 1) mousing over any of the four tabs produces a hover state 2) Clicking on any of the first three tabs produces an "on" state, displays the corresponding menu panel, and puts the other tabs in their "dimmed" state 3) Clicking on another tab when one is already "on" hides
[jQuery] change title of the dialog by setData
How do I change dialog title after it was created? I try to do $('#dlg').data('title', 'new title') or $('#dlg').data('dialog.title', 'new title') but its not working the only way I get run the setData event is using .data('setData.dialog', 'something in here') but then key for a function is setData. any ideas? I'm using jquery-1.2.3 and ui - 1.5b2 thanks
[jQuery] jQuery / Spry
Anybody know of any good comparisons/discussions of jQuery vis-a-vis Spry? If none exist, anybody want to weigh in? :-) I know it's not necessarily an either-or decision, but as we've been evaluating frameworks, our 'coders' prefer jQuery and our web developers prefer Spry. I feel like we haven't really done a deep enough evaluation yet, but whatever information/evaluation others have made would be useful. Thanks, dwh
[jQuery] IE6 flicker/display problem
http://docs.jquery.com/Tutorials:Live_Examples_of_jQuery This url used to display fine in IE6 (im pretty sure...) and now when I open it, the 2-column content is hidden as soon as jQuery fires (on ready). Why is this happening? I've tested this on two machines running IE6. Is this happening to others as well? Is there a fix? Or at least a culprit?
[jQuery] ui.sortable problem
I've noticed the oddest thing...or perhaps it's not odd at all. I have a series of lists that I use ui.sortable to move things around...works great...except... It creates an extra li element and attaches it to the end of the active ul group. For instance I start with... <ul> <li>one</li> <li>two</li> <li>three</li> </ul> And when I'm done dragging, using $('#id').sortables( ... stop: function(){ }... ); and I alert out the order of things I will get: (moving two to first position) <ul> <li>two</li>
[jQuery] jquery 1.2.3 not working in my application
I have just started learning jquery on the job. I am working on existing application which uses jquery 1.2.1. I wanted to use 1.2.3 for getting better performance. When I do the substitution and load my page, I get the following errors jQuery(document).ready is not a function jQuery(document).triggerHandler is not a function I am not sure why these are caused. And both these are very fundamental stuff. When I compared 1.2.1 and 1.2.3 versions, the 1.2.1's ready function does not have a call to triggerHandler
[jQuery] Caching?
Hello! I need to load a value (returned by a php script) into a textbox each 10 seconds, and reload web if this value change. I'm using next code: <script src="jquery.js"></script> <script> $(document).ready(function() { //ajaxTime.php is called every second to get time from server var refreshId = setInterval(function() { $.get("contar.php?accion=respuestas", function(data){ $('#txtNuevo').val(data); if(parseInt($('#txtNuevo').val()) > parseInt($('#txtUltimo').val())){
[jQuery] Switching input type
Hi guys, I have a form input that displays "Enter a password" (value="enter a password"), which when in focus I would like to convert to a password field. I'm looking for something like this: <input type="text" value="enter a password" onFocus="hidePass()" /> to <input type="password" /> I've tried following the API, but I still get "uncaught exception: type property can't be changed" error in Firebug. Any help would be much appreciated. - Samuel.
[jQuery] jQuery selectors with reference to object
Hi, I am new to jQuery and is curious if this code can be shortened down? It feels like it can, but I couldn't find any way to use jQuery selectors if I have a specific reference to a object. What I want to do is to find the element to the parent of "el" that the id starts with linecolorbox. I know how to do it if I want to find ALL the ones that id start with linecolorbox, but not if I want to start with a specific element as reference (el.parentNode). jQ('.linecolor').each( function()
[jQuery] RFC: buttons and cancel class
Hi, I have button (type: submit) with the class 'cancel' but this still results in the form being validated. It works if I change the button to an input. After // allow suppresing validation by adding a cancel class to the submit button this.find("input.cancel:submit").click(function() { validator.cancelSubmit = true; }); To fix this on line 42 I added, // allow suppresing validation by adding a cancel class to the submit button this.find("button.cancel:submit").click(function() { validator.cancelSubmit
[jQuery] problem closing browser events (unload funtion)
hi, I want a simple ajax event to be fired when user closes the browser; the code below sometimes works, sometimes not... and don't know the reason. someone has an idea why does it happen? I suppose it's about browser behaviour... (tested by firefox 2.0) And if I wanna apply this when a user closes a browser tab, is it possible? (I think unload affects only when you close the browser, not any tab) jQuery(window).unload(function() { $.get('http://localhost/fitxers/borvdrar.php'); });
[jQuery] My jquery-powered project:
Hi guys, I just wanted to show off my new project realised with jquery: http://www.tubesearch.de What do you think?? Any suggestions regarding improvements, design or handling??
[jQuery] bug in jquery ? css('border') returns undefined
I wonder why this doesn't work, either it's a but or a flaw in the documentation: consider this code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>"> <html> <head> <style type="text/css"> h1 { background-color: #FF00FF; color: white; border: 1px solid red; } </style>
[jQuery] jQuery for loop - am I crazy?
I think I may have been looking at this a little too long or something to cause it not to work coz it seems like it should be pretty simple to do, but it no work for me :( What I want to do is loop through all the <dl> elements within a certain div and hide all of them except for the first one. Here's my broken code: function initDashboard(){ $(document).ready(function(){ if($(".adminMsgSummary").length > 0){ var theCount = $(".adminMsgSummary dl").length-1; for(z=1;z<=theCount;z++){
[jQuery] Forms: Email before submit
Hello everybody. I have a form which data has to be sent to a CRM (salesforce), so in the form action I have to include "https://www.salesforce.com/ servlet/...", but I need to send emails before the form submits, because how the form is in an external url, I can't manage the data once the form is submitted. Any idea of how can manage that? Thanks a log.
[jQuery] tablesorter- click function not working on next page
I'm using the tablesorter plugin and having a tough time trying to figure out why my click function does not work on the the next/second page when using the pager plugin. $(document).ready(function() { $("#myTable").tablesorter({widgets: ['zebra']}).tablesorterPager({container: $("#pager")}); $('tbody tr').click(function(){ alert('hi'); }); } );
Next Page