[jQuery] General drag drop question without UI plugin
Is there a way to determine a drop container without looping through each container and comparing absolute positions? This is the only solution mentioned in this article: http://www.webreference.com/programming/javascript/mk/column2/2.html I don't want to have to move the item being dragged out of the way of the cursor so that i have event.target available. I'm thinking it can be looked up some how with a hash table so that it is O(1). I suppose we can assume that the containers do not overlap..
help porting from prototype to jquery - ajax.request
Hi, Very new to JS let alone the various libraries... I am trying to port to Jquery but have got completely stuck!! Can anyone point me in the right direction? or specify a function I should use? I'm very interested in learning but there is just so much to take on that its a bit overwhelming... My prototype code: getServerTime : function(){ try{ var req = new Ajax.Request(NTP.serverUrl,{ onSuccess : NTP.parseServerResponse, method : "get", parameters : "t=" + NTP.getNow()
[jQuery] $('.someclass[initialized!=1]') fails in 1.3; works in 1.2 (if elements don't have initialized attr)
Say i have several elements with class='someclass' and they DON'T have attribute 'initialized' initially. When i do $('.someclass[initialized!=1]') in 1.2.6, i get the list of all those elements. In 1.3, i get an empty list. I traced it to line 1986 in jquery 1.3 (Revision 6104) that will return false if given attribute doesn't exist. So, is it a bug or a 'feature' of 1.3? :) I hope it's a bug cause this is very useful when you want to get all elements that weren't initialized before. If it's a feature,
[jQuery] Jquery image swap and carousel glitch?
http://www.ardentcreative.co.uk/example/example.asp I've built this page using Jquery and the carousel and swapimage plugins. The inital thumbs swap the main image fine, but when you use the carousel to show the hidden thumbs, the hidden thumbs do not swap the image. Not sure if it is a 'glitch' in the plugins or my dodgy javascript!
[jQuery] Clicking on 'th' and changing column bg color???
How would I go about 'clicking' on a 'th' in a table and changing the bg color of the corresponding column of data? I'm a bit stuck on this. Anybody?
[jQuery] Display GIF animation during jQuery loop
Hi, I have a probably basic problem. I actually want to display a simple GIF animation during a jQuery function which actually takes a few seconds to run. Basically, I do : $('IMG.my_gif_animation').show(); try { $('...').each(function() { ... }); // which takes a few seconds } finally { $('IMG.my_gif_animation').hide(); } My problem is simple : the GIF image is correctly displayed but as soon as the jQuery loop starts, GIF animation is stopped ! Any hint would be welcome... Thanks, Thierry
[jQuery] list of animate() params?
Hi all, Is there a comprehensive list out there of the different parameters that can be given to the animate() function (e.g., borderWidth, etc). Thank you.
[jQuery] About html doc download
Hi, JQuery is definitely a great tool. I have been using it for a while. A comment, during coding I keep referring back to the online doc. So it will be great if I can donwload the doc as html to my local machine. I don't see how to do it now. Or maybe I just missed it? If not, I am quite sure this will be helpful to many developers including me :) Thanks a lot! Jimmy Chu
[SOLVED]9-grid - background image not adjusting on appending
The new version of 9-grid come with a remove9Grid() function. If after I've appended my content I remove9Grid() and scale9Grid() again then the background-image adjusts. There is still a problem that this produces a flickering effect as 9Grid removes the image on remove9Grid()... if I find how to sort this out I'll post it here. On the meanwhile I've raised an issue with the 9Grid guys. BTW, if you're not using this plug-in, TRY IT! it's the best solution I've found until now for solving the rounded
[jQuery] colon in xml tag on webkit - cannot select
Using jquery 1.2.6, but I quickly tested this on 1.3 as well. I am parsing the google books search feed http://code.google.com/apis/books/docs/gdata/developers_guide_protocol.html#SearchingForBooks (about 1/3 down the page is an example feed). This feed has tags like <openSearch:totalResults>, <dc:creator>, <dc:title>. This code succeeds in IE and firefox, but not in Chrome or Safari. 1 $.get( URLstem+query, {}, function(xml){ 2 numberResults = $('feed', xml).find('openSearch\ \:totalResults').text();
[jQuery] How to select an element using its attributes
Hi all, I am a newbie to jQuery. I encounter a problem in the 2nd line $(".imgs[src!=$('#photo'.attr('src')]").hover(function(){ it seems that $(".imgs[src!=$('#photo'.attr('src')]") returns no jQuery object, while in logic it should return jQuery object. Could anyone help to explain why? Thank you. The code is as follows: $(document).ready(function() {; $(".imgs[src!=$('#photo'.attr('src')]").hover(function(){ $(this).css({borderColor:"#ffff99", cursor: "hand"}); },
[jQuery] Form Plugin with jQuery 1.3
I've been getting a lot of email questions about the Form Plugin's compatibility with jQuery 1.3. A couple weeks ago I updated the plugin to fix a minor compatibility issue with the file upload logic. The latest version (v2.18) is available here: http://jqueryjs.googlecode.com/svn/trunk/plugins/form/jquery.form.js Documentation is here: http://www.malsup.com/jquery/form/ Mike
[jQuery] problem while using jquery thickbox with asp.net
Hello, I am asp.net developer, recently I have started to use jquery for the reach ui on my web application. I am using Jquery thickbox to implemnt thickbox on my page *********************************************************************** Private Sub cmdAddTreatment_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdAddTreatment.Click Me.ScriptManager1.RegisterStartupScript(Me, Me.GetType(), "MyThickbox", $(document).ready(function(){ tb_show('Add Treatnebt For Restorative Care
[jQuery] Hide specific characters
Hi There, I am using a CMS product that does not enable me to hide cart totals from their cart summary. I need to do this for this particular client. Here a snippet of code for the rendered page: <span id="catCartSummary" quote="False" vertical="False"><table cellspacing="0" class="cartSummaryTable"><tr><td class="cartSummaryItem">2 item(s), Total: $0.00 <a class="cartSummaryLink" href="/OrderRetrievev2.aspx? CatalogueID=34987">View Cart</a></td></tr></table></span> I would like to hide (or remove)
Tabs
I'm searching how to open a specified tab on a refresh... Ex : I want my second tab to pen after a form submission. I've tested this : $(".selector").tabs("select", '#foo'); (it's from tabs documentation) but it doesn't seem to work when I specify my selector an the name of my tab... Anyone can give me a clue ? Thx
Scrolling the browser window (scrollTo / localScroll help)
Hi Y'all. I wish to set up site navigation that scrolls down the page to the relevant anchor or element? I'm pretty sure I need to use either scrollTo() plugin or localScroll() plugin. But just not sure how to implement it. I've tried the below code, but no success. $('a.btn_one').scrollTo('div#one'); This does nothing. I'm not an expert of anything but I can usually do what I want with jQuery but this little trick evades me! Most frustrating. Any help would be greatly appreciated, and thank you
[jQuery] BUG: FF3 and jQuery's mouseleave
If you bind mouseleave to a element and the mouse enters the element then exits onto an INPUT text control, the mouseleave event does not get triggered. This bug is not present on IE7, Safari 3.2.1, or Google Chrome 1.0.154.43. This bug was not tested with other INPUT elements or a SELECT element. Please advise. Need a solution.
[jQuery] superfish question
I have superfish dialed in great except for two little issues. 1. In IE6, whenever I hit the back button after clicking on a button, the button (along with the dropdown) appears with the highlighted color. Almost as if something is set to remind the user where he/she is coming from? I want to disable this. 2. How do I make it stay on the highlighted color per section? Right now the highlighted button goes away and you have no way of knowing what section you're in. Is there something built in already,
[jQuery] Validation Plugin: additional-methods.js
Thanks again to Jorn for a fantastic plugin. One thing I noticed, with the additional-methods.js file that is included with the download, is a small error with the messages for the maxWords, minWords, and rangeWords methods. They are missing $.format():<div> </div><div><div>jQuery.validator.addMethod("maxWords", function(value, element, params) { </div><div> return this.optional(element) || value.match(/\b\w+\b/g).length < params; </div><div>}, $.format("Please enter {0} words or less.")); </div>
[jQuery] [validate] Numbers Validator Error
I am having a problem with getting the numbers validator to work correctly. I keep getting the following from firebug: exception occured when checking element time_entry_hours, check the 'numbers' method $.validator.methods[method] is undefined [Break on this error] (function($){$.extend($.fn,{validate:fun...cured when checking element "+element.id
[jQuery] select the parent recursively
current we have the html like following and I always want get element: <span xmlns="asa"> started from the element <input>: <span xmlns="asa"> <span> <input value="" size="10" class="exercise-input exercise-input- formula" name="1"/> </span> </span> or <span xmlns="asa"> <span></span> <span> <input value="" size="10" class="exercise-input exercise-input- formula" name="1"/> </span> </span> so the only fixed element in this html is the input element and input has a far far parent <span xmlns="asa">.
jquery + form fields
hi, I have a form and I used jquery to just display the result message(kind of thanks message) to avoid the page refresh. Everything works fine. I would like to do two things after the form is submitted. I am new to jquery and I wrote the code after checking out some sample examples. After submitting the form, I want to 1) Reset the form as I do not want user to resubmit it again with the same data. I found how to reset the text fields but not able to do text area. 2) After the form is reset and
[jQuery] Index of Parent TD
Hi there, I have a link which sits inside a td within a tr within a table. What I would like to do is find out which td (which column) in the table this link is within - I need to find the column index. Once I have this I can then remove the column from the table. Any ideas on how to do this? I've tried the core index - but to no avail. Thanks!
Problems with jQZoom Evolution and jQTabs
Hi everyone, I am having a problem trying to implement two different jQuery scripts; jQZoom Evolution (http://www.mind-projects.it/projects/jqzoom) and jQTabs (http://stilbuero.de/tabs). I am trying to make an interactive photo gallery. I seem to be getting some kind of conflict with the two scripts. On load everything works fine, however, when I click on the image to change tabs it all goes wrong. I am new to JavaScript so would appreciate you help and support. I have uploaded a test page with the
[jQuery] How to handle responses from PHP with $.ajax()
Hi, I'm new to ajax and jquery but I'm not new to PHP. The following example seems to work okay to a point but I can't figure out how to handle data validation errors generated in my PHP. In my example I want to post some data to a script called ajax.php. That script will check the data for validity and then return true or false depending on the outcome of the checks. It will also set an appropriate error message. How can I handle the returned data and display an error message if needed in ajax?
[jQuery] jquery 1.3 n.queue is not a function?
When I try to use jquery 1.3 on my test site, I get this error: jQuery.queue is not a function [Break on this error] var queue = jQuery.queue( this, type, data ); (firebug) The site is using livequery, form, metadata and validate plugin in, all upgraded for 1.3 support. Weird.
[jQuery] system div wants to chat
----------------------------------------------------------------------- system div wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-cc2d1cd851-2e8029a520-4143a4170ddaaae3 You'll need to click this link to be able to chat with system div. To get Gmail - a free email account from Google with over 2,800 megabytes of storage - and chat with system div, visit: http://mail.google.com/mail/a-cc2d1cd851-2e8029a520-c0b5557925
[jQuery] Having problem with jcarousel at http://sorgalla.com/jcarousel/ in Safari
Hi, I made a scroller with the help of jcarousel (http://sorgalla.com/ jcarousel/). But it is having problem in safari and chrome. It is not working at one go. I mean I need to refresh it once to get it start working. It is happening only in chrome and safari and ofcourse it is not working in IE6. The file is located at www.gauravchandra.com/gaurav_scroller.zip Can anybody help me? I need to fix it soon otherwise I will be in trouble. Thanks. Gaurav
[jQuery] $.ajaxSubmit ( ERROR :
Hello. Do you think that there is a way to get a return code, when uploading file? <form> <input type=file> </form> $("form").ajaxSubmit ( {error: function () {alert('error')} ); Now because the upload is by using invisible iframe and not by XHR, I think that I cannot get the error function to work. Am I right? I am using FireBug, and also when there is an error in the post, the error function not trigger (the newest jQuery ver) Thank you.
[jQuery] Calling Joel Birch! - jQuery menu widget Issue
I'm using your Superfish v1.4.8 - jQuery menu widget and am having an issue. When I navigate away from the main index page and then use the back button, the menu in which I used is still there, opened up and highlighted. If you have any insight on what could be causing this I would greatly appreciate hearing. Thanks!
[jQuery] How do I communicate with other windows with jquery
On firefox mutiple tabs, how do I manipulate the other tabbed window, such as set focus or change css on a specific element?
jQuery - click event fire twice
Hi, I have a problem with my jQuery click event. I have on my page an input type=button and when i click the button the click event happens twice. here is my code: my input button: <input type="button" name="UDRaddPhone" class="buttonAddPhoneEnabled" id="UDRaddPhone_but" value="Add" /> and this is my jQuery : $("input#UDRaddPhone_but").click(function() { // validate and process form // first hide any error messages $('.error').hide(); var phoneType = $("select#UDRphoneType").val(); var phone = $("input#UDRphone").val();
[jQuery] PHP $_SESSION data empty in a jQuery AJAX call
Hello everyone. I was racking my brain for a few hours today over a problem pertaining to an AJAX call in jQuery. Basically, I have the user click an item in a <select> list. Upon clicking an <option> a .post request is sent to a script, which gives me some HTML data to be added to part of the page. That part works fine. But, the server-side script also stores a variable in the $_SESSION variable when it's called. But this is not stored in the clients session as I anticipated. It appears to be being
Newbie Help! Form posts twice.
Hello Family, I am a newbie to JQuery but not new to programming as such. I have this big form to validate. The form is divided into two parts, one for new users and the other for registered users. However there are 10 mandatory fields that both the users should fill. Once the user fills the 10 mandatory fields, then he/she has to click on a link which bifurcates the form. If he/she clicks 'New User' links then another 10 fields are shown and if he/she clicks 'Existing User' then only the username
[jQuery] Populate Form within Thickbox
On the parent page I have a list of items that were submitted to the DB from a text field form within an inline Thickbox. On each one of these items, I have an "Edit" link, which will also open the same inline thickbox form, however, I am unclear how to populate the form with that items saved information. My back-end developer is using Spring MVC and Hybernate if that helps at all.
[jQuery] Need access to index within loop
HI, I have this code: $(document).ready(function(){ $('li').each(function(i) { alert(i); $('li:eq(i)').fadeIn('slow'); }); }); I want to iterate over each li element and fade it in....with a delay for each one....i'll deal with the delay in a bit but currently the problem is this bit $('li:eq(i)')....it won't accept the i parameter...it wants a literal number....how do I do this? -- View this message in context: http://www.nabble.com/Need-access-to-index-within-loop-tp21601683s27240p21601683.html
[jQuery] Extension/modification/overriding jQuery plugins
Hi all, I'm developing functionality for an application using jQuery plugins. Our organization has a compelling need to allow for these plugins to be extended without touching the original code. I.e., let's say I have a plugin that looks like this: $.fn.somePlugin = function(callerSettings) { // statement #1 $(this).click(function(e) { doStuff(); }); // statement #2 $(this).hover(function(e) { doSomeMoreStuff(); }, function(e) { doStillMoreStuff(); }); } I'd like to allow users of this plugin to
[jQuery] Image preview tooltip
Hey folks i am currently using this nice image-preview/tooltip guy: http://cssglobe.com/lab/tooltip/03/ my problem, is that when the tooltip shows up on the side of the window, it overflows outside, creating horizontal scrolling (ew!). is there an equivalent somewhere that dynamically switched the side it displays on? i have seen this elsewhere. thanks!
[jQuery] Help
<div><span class="Apple-style-span" style="border-collapse: collapse; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">How do I modify the have a list of language links rather than a drop down menu trigger the .localize</span> </div><div> </div><div><div><%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%></div><div><!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>"></div>
Badly Needed help on this one..
here is my code for my sliding divs. This code works perfectly in Chrome and Safari but having problems in FF 3 and IE7. On the initial load on ff3 and ie7, when you click the link the first time it will work and the rest is history. Please help on how to resolve this one. Thanks in advance. --------------------------javascript code ---------------------------------- <script type="text/javascript"> $(document).ready(function(){ $('#slide1').animate({ left: 0 }); $('#slide2').animate({ left: 900 });
Next Page