[jQuery] Re: JqModal / simpleModal - maintaining form state
on 8/31/09 5:27 PM, Eric Martin at emarti...@gmail.com wrote: If you are referring to the known issues I mentioned - since they are browser issues, Eric, thanks for the response. What issues did you mention that I missed? you'd need to implement something that woul keep track of state in those browsers. What code have you used for this? Just copy all values into an array on close and reset on open? On Aug 31, 6:45 am, Steffan A. Cline stef...@hldns.com wrote: on8/30/09 12:48 PM, Steffan Cline at stef...@hldns.com wrote: I have tried both of these modal solutions, beautiful by the way, and found a small problem with both of them and am wondering if there is a work around. I have a form where there are a bunch of check boxes that I have enclosed in a div that I am using for my popup modal. Now the thing is that while the modal is up and I check a bunch of boxes and then close the modal, reopen again, all checkboxes have been reset rather than retaining their state. Is there a way to circumvent this behavior? So, if I click checkbox #1 and close the modal and then reopen the modal, checkbox #1 is no longer checked. I need it to maintain it's state. Any suggestions? Thanks Steffan I tried a couple other modal type plugins and seem to have the same issues. Has anyone seen this before? Is there a work around? Thanks Steffan Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Re: $.ajax() issue
Hi, I installed fiddler and analyised the traffic but i am not able to find the result. So, can you help me out to find whats going wrong? On Aug 29, 7:13 pm, MorningZ morni...@gmail.com wrote: I do not understand did you not ask in the original post: So i need help to figure out whether this is client-side or server- sideissue Using Fiddler will tell you if it's a client side or server sideissue because it will show you EXACTLY what the browser is trying to do something littering your code with alert-s is not going to accomplish... Whatever i suppose good luck solving yourissuehow you see fit On Aug 29, 10:01 am, g...@iec abhi.pur...@gmail.com wrote: Is there any other way to find out the root cause apart from these. On Aug 29, 6:55 pm, MorningZ morni...@gmail.com wrote: Have you tried an HTTP monitor like Fiddler (http://www.getfiddler.com) to see what is going on when the $.ajaxrequest starts? That will help diagnose for sure On Aug 29, 9:46 am, g...@iec abhi.pur...@gmail.com wrote: Hi all, I have anissue. I am submitting XML data usingajaxcall which updates data on server. It works fine in firefox but gave 404 error in IE. Theajaxcall which i am using is mentioned below : var url = '/' + serviceContext + '/services/content/update/' + structid; alert(nodeData); $.ajax({ url: url, type: 'POST', data: nodeData, contentType: 'application/xml;charset= UTF-8', cache: false, processData: false, dataType: 'xml', success: function(){ changeCounter = 0; $('#messages').text('Changes to metadata updated successfully.'); return false; }, error: function(xhr, textStatus, errorThrown) { $('#messages').text('Error! HTTP Error code ' + xhr.status).addClass('warning'); return false; } }); Here nodeData is a xml which i am sending to server. So i need help to figure out whether this is client-side or server- sideissue. This call works fine in firefox and updates data on server but in ie it gave 404 error (and response from server says : ' Could not find resource at '/' + serviceContext + '/services/content/update/' + structid link. ') Thanks to all in advance for providing suggestions.
[jQuery] Re: Https mixed content error with ajax
Watch the 'net' tab in Firebug, make sure everything that pops up there is https:// . If everything /is/ https:// , post the url here (either of your site or just a limited test case). Jonathan UglySkinnyGuy wrote: Yes thats all fine. Like I said it only occures when I make an ajax call out and then inject the returned html into the DOM. On Aug 31, 3:44 pm, James james.gp@gmail.com wrote: Is the include script to the jQuery library also HTTPs? All external content (CSS, Scripts, Images) has to be over HTTPs to not create the mixed content error. On Aug 31, 5:10 am, UglySkinnyGuy evan.e.free...@gmail.com wrote: Have a wierd issue. It seems that if I use jquery in https and do an ajax call out and then update the dom with the resulting html I get an HTTPS unsecure content warning. Now the content is all https and there are not http calls any where so I'm wondering if this has been seen before. I've dug very deep looking for the issus and if I take jquery out of the equation it doesn't give me an error. But I've standardized jquery as part of the site and don't want to mix straight old javascript with jquery, if I can avoid it. So any help would be useful.- Hide quoted text - - Show quoted text - -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Jquery at Sears
Erik Reppen wrote: I should specify. It's not the little guy in the upper left although it might be worth plugging it into that. It's all the silly ones down below. On Aug 31, 11:58 pm, Erik Reppen erik.rep...@gmail.com wrote: What do you guys think of my precious. I'm not sure how many other elastic carousels there are out there, but I'm pretty proud of the auto-margin action. Please don't judge us (the FEDs at Sears) on the HTML. We don't actually have full control of the front end. It can scroll full pages but doesn't for other reasons that relate to not having full control of the front end among other things. I really liked the whole options hash thing from JQ in action so it's actually got a few options like switching to vertical for the carousel in our shopping whose item height is currently misaligned for other reasons that relate to not having full control of the front end. ;) Anyway I'm contemplating making a more generic and diversely featured one eventually and hope to start contributing when I have time. http://www.sears.com/shc/s/p_10153_12605_05775819000P?mv=rr aww, you guys fixed the bug where you could change the breadcrumbs displayed on the site just by changing the GET params. Too bad, that was a fun feature ;). The carousel seems to work pretty well, I'm sure it would be welcome if you turned it into a plugin and uploaded it somewhere. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: jQuery accordion menus flickering in IE 6 and 7
This should be fixed in trunk. Give the latest stylesheet a try: http://jquery-ui.googlecode.com/svn/trunk/themes/base/ui.accordion.css Jörn On Mon, Aug 31, 2009 at 8:54 PM, Moose1rcob...@gmail.com wrote: I've seen several threads about this online but haven't not seen a solution that has worked so far. My accordions work great, but in IE 6 or 7, when the animation is done, the entire contents of that div flicker for a split second. Is there a solution to this? My page is here: http://www.keene.edu/grants/internal_test1.cfm Thanks so much for any help on this.
[jQuery] Re: Strange problem with ui.datepicker.js
Does anyone have any ideas atall on this? Is it a ui.datepicker bug? Any thoughts/pointers/things to check would be greatly appreciated. Regards, Lee On Aug 28, 4:02 pm, Lee Mc lee.mcmul...@gmail.com wrote: Hi all, Getting a very strange issue with the datepicker component. It seems that whatever the first date on the bottom line of the displayed picker is, is being duplicated. Take a look at what I mean here: http://i773.photobucket.com/albums/yy12/lmcmullen8/datepicker_prob.jpg There are lots of individual datepickers being created on this form and I'm getting this behaviour with all of them Has anybody come across this before? Cheers, Lee
[jQuery] Re: $.ajax() issue
Hi MorningZ, I found the problem. In ie, 'contentType' changed from 'application/xml' to 'text/xml' and on server-side we are expecting 'application/xml'.And in firefox,contentType is application/xml. But don't know how it got changed? Any idea is welcomed. On Sep 1, 11:22 am, g...@iec abhi.pur...@gmail.com wrote: Hi, I installed fiddler and analyised the traffic but i am not able to find the result. So, can you help me out to find whats going wrong? On Aug 29, 7:13 pm, MorningZ morni...@gmail.com wrote: I do not understand did you not ask in the original post: So i need help to figure out whether this is client-side or server- sideissue Using Fiddler will tell you if it's a client side or server sideissue because it will show you EXACTLY what the browser is trying to do something littering your code with alert-s is not going to accomplish... Whatever i suppose good luck solving yourissuehow you see fit On Aug 29, 10:01 am, g...@iec abhi.pur...@gmail.com wrote: Is there any other way to find out the root cause apart from these. On Aug 29, 6:55 pm, MorningZ morni...@gmail.com wrote: Have you tried an HTTP monitor like Fiddler (http://www.getfiddler.com) to see what is going on when the $.ajaxrequest starts? That will help diagnose for sure On Aug 29, 9:46 am, g...@iec abhi.pur...@gmail.com wrote: Hi all, I have anissue. I am submitting XML data usingajaxcall which updates data on server. It works fine in firefox but gave 404 error in IE. Theajaxcall which i am using is mentioned below : var url = '/' + serviceContext + '/services/content/update/' + structid; alert(nodeData); $.ajax({ url: url, type: 'POST', data: nodeData, contentType: 'application/xml;charset= UTF-8', cache: false, processData: false, dataType: 'xml', success: function(){ changeCounter = 0; $('#messages').text('Changes to metadata updated successfully.'); return false; }, error: function(xhr, textStatus, errorThrown) { $('#messages').text('Error! HTTP Error code ' + xhr.status).addClass('warning'); return false; } }); Here nodeData is a xml which i am sending to server. So i need help to figure out whether this is client-side or server- sideissue. This call works fine in firefox and updates data on server but in ie it gave 404 error (and response from server says : ' Could not find resource at '/' + serviceContext + '/services/content/update/' + structid link. ') Thanks to all in advance for providing suggestions.
[jQuery] Effects: problem with slideToggle() and IE7
Hi, I use slideToggle() to slide a DIV up and down. The section (DIV) should be closed on load. Works fine in Firefox. The problem is IE7. If I use display: none; the section opens on load. Is there a way to use display: inline (or leave it out since it's default value) and slideToggle to be closed on load? If I use display: none (the section opens) the content in the DIV is displayed correct, but not with display: none; I'm not very good at handling cross-browser css issues so I could probably improve my CSS, but the use of display: inline would be a simple fix. jQuery(#alpha).click(function() { jQuery(#wrapper_about_alpha).slideToggle('normal'); }); // jQuery(#testimonals).click(function() { jQuery(#wrapper_testimonals).slideToggle('normal'); }); http://www.alphaorebro.se Any help would be much appreciated.
[jQuery] Re: not returning a JSON object
Hi, sorry - what is json.d? On Aug 27, 6:43 pm, W. Young wayland.yo...@docupak.com wrote: have you tried json.d ? On Aug 27, 9:38 am, defdev sp...@definitivedevelopment.co.uk wrote: Hi, i have a form defined as follows: $(document).ready(function(){ $('#edit_page_form').ajaxForm({ type: POST, timeout: 45000, dataType: 'json', error: function() { alert(error etc ); }, success: function(json) { alert(json); alert(json.message); }, complete: function() { alert('done'); } }); }); when alerting json in the success function - it echoes out the Json as a string, and not a valid object - hence, json.message doesnt work/is undefined. from the server side: echo '{ message: why wont this work }'; im using jquery 1.7.2. is there something obvious i am missing? cheers Joe
[jQuery] Re: save to pdf
That's not possible. David .Wu wrote: Is there any plugin can let me save the part of pag as pdf?
[jQuery] Re: not returning a JSON object
2009/8/27 defdev sp...@definitivedevelopment.co.uk: from the server side: echo '{ message: why wont this work }'; That isn't valid JSON. According to the JSON spec http://json.org/, the name part of a name: value pair needs to be quoted with double quotes, and a strict JSON parser will enforce this. Changing it to echo '{ message: why wont this work }'; will fix it. Of course this may not actually fix your problem - I'm not sure how strict jQuery is about enforcing JSON parsing rules - but fixing it will eliminate one possible point of failure. Regards, Nick. -- Nick Fitzsimons http://www.nickfitz.co.uk/
[jQuery] Re: not returning a JSON object
Nick, thanks, but that didnt solve it either. return from the ajax/form submit: # alert(json); { message: why wont this work } # alert(json.message); undefined in firebug, the headers are correct (application/json) - im struggling to see whats wrong? On Sep 1, 11:55 am, Nick Fitzsimons n...@nickfitz.co.uk wrote: 2009/8/27 defdev sp...@definitivedevelopment.co.uk: from the server side: echo '{ message: why wont this work }'; That isn't valid JSON. According to the JSON spec http://json.org/, the name part of a name: value pair needs to be quoted with double quotes, and a strict JSON parser will enforce this. Changing it to echo '{ message: why wont this work }'; will fix it. Of course this may not actually fix your problem - I'm not sure how strict jQuery is about enforcing JSON parsing rules - but fixing it will eliminate one possible point of failure. Regards, Nick. -- Nick Fitzsimonshttp://www.nickfitz.co.uk/
[jQuery] Re: jQuery select where attribute ID less than
Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code: http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namirnamiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: Hover does not stop
ok, i tried this and this works fairly. but another question is: can i change the state AFTER the animate() is finished? (there are still some problem when i touch certain points while sliding) $(function(){ var state = 0; $('#navigation').mouseover( function() { if(state == 0) {$(this).animate({left: '0'}, 'slow'); state = 1;}} ); $('#navigation').mouseout( function() { if(state == 1) {$(this).animate({left: '-210'}, 'slow'); state = 0;}} ); });
[jQuery] Feedback on site, contents, enquiries, information
Hi Can any body suggest me a best jquery examples of FeedBack on Site,Contents,Enquiries,Information of a site -- Regards, Bharath
[jQuery] How to Do This
Hi I have seen one site which consists of share/Email in a single tab. Can any body tell me hw to do this FYI.. site: http://www.networkworld.com/news/2009/083109-vmworld-xen-cloud-initiative.html?ts0hbstory=vmworld Please find the attachment -- భరత్ భూషణ్ అంబటి attachment: imp.JPG
[jQuery] Ajax Auto Updating in Modal Popup in jQuery
Hello, I am doing software engineering in bangladesh. Right now i am doing Screenshot development of my current project. I am gonna using jQuery as Javascript framework in my project. For this i need some help as i dont know jQuery very well. Is it possible to make Modal popup which is auto updating every 15 seconds and the updating continue for about 1minutes? if so, you dont need to give me the solution. Better you can give me the link. Thanks
[jQuery] [Autocomplete] Autofill Comma Seperator Issues
Hi, I am trying to use this autocomplete http://docs.jquery.com/Plugins/Autocomplete but I'm having some issues with it. I'm trying to create a simple tag autocomplete feature. This is what I want to type (Example 1) TextArea: Cake, Ca, Caldren, Calimari, This is what I get (Example 2) TextArea: Cake, Cake, Caldren, Calimari, In Javascript, my var data = [Cake, Caldren, Calimari]; As you can see, I cannot type Ca because the information will autofill to Cake every time I type a comma. The only way I can avoid this is to do something very un-user friendly. That is to type Ca then press space and then type my comma. That's the only way I can do it to make Example 1 work. This is my code: jQuery(#TagBox).autocomplete(data, { multiple: true, highlight: false, multipleSeparator: , }); What am I doing wrong?
[jQuery] Re: save to pdf
achua.com On Tue, Sep 1, 2009 at 11:23 AM, David .Wu chan1...@gmail.com wrote: Is there any plugin can let me save the part of pag as pdf?
[jQuery] How to detect window is scroll or not using window.scrollTo()
Hi all, Is there a way to detect whether window is scroll or not .I am using window.scrollTo() function. Thanks Rupak
[jQuery] circular autoscrolling
Is it possible in jCarousel to have circular autoscrolling? I tried setting the circular scrolling example to autoscroll and it wouldn't work. However, when I took all the content out of the container it worked somehow. Is this a bug? The only thing I changed in the example was: jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ wrap: 'circular', auto:1, scroll:1, itemVisibleInCallback: {onBeforeAnimation: mycarousel_itemVisibleInCallback}, itemVisibleOutCallback: {onAfterAnimation: mycarousel_itemVisibleOutCallback} }); }); and div class= jcarousel-skin-ie7div style=display: block; class=jcarousel-container jcarousel-container-horizontal div class=jcarousel-clip jcarousel-clip-horizontal ul style=width: 497px; left: 0pt; id=mycarousel class=jcarousel-list jcarousel-list-horizontal !-- The content will be dynamically loaded in here -- /ul/div/div/div
[jQuery] [validate] [ajax]
Hi all, Still green with JQ. I have the following code which does work to a point except the validation runs but the form submits (via ajax) regardless. I know I need to change the code round, ajax in the the validate call - I think. Could do with help on this! $(document).ready(function() { $(#myform).validate(); $(#myform).ajaxForm({ success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }); });
[jQuery] Table TableRow Selector String Formator
I am a newbie to jQuery and I posted a question a couple of days ago and it was swiftyly answer. The results of which helped me create a couple of functions which I am posting. Initially, I was searching for rows of a table with wildcard search parameter. Example: id*=\IndividualsExisting (notice the * ) This was taking a long time because the webpage has a few tabpages with quite a few tables. It took me awhile (as a newbie) and with the help of this group, I was able to create a couple of functions that used more specific Selector search criteria and now the searches go quite quickly. Here are the functions and thanks to everyone for answering. (Especially Charlie Griefer) function jqSelectorStrTblRwObjSingle(p_i_How, p_s_pgPrg, p_s_Table_ID, p_s_Row_ID, p_i_Row_Nbr) { // Descriptions : Returns a single Table Row Object jQuery Selector String // p_i_How : 1 or 2 - See switch case statements below // p_s_pgPrg: In asp.Net user controls, the ctl00_USER- CONTROL_PATHNAME_Ctl_ - If not using user-controls, leave . // p_s_Table_ID : table id= The id of the table // p_s_Row_ID : trid= The id of the table row // p_i_Row_Nbr : If tablerow ID's are are incremented (i.e. myRow1, myRow2, myRow3, etc) the exact row number looking for. // Usage //var h1 = jqSelectorStrTblRwObjSingle(2, ctl00_MyUserControl_Ctl_, MyTable, myRow, 5) where 5 can be a variable like iRowCount //$(h1).each(function() { //alert(this.id); //}); var retStr = ; switch (p_i_How) { case 1: // Example of what is returned: //table:first[id*= \tblucContactsIndividualsExisting_grd\] tr:first[id*= \trMainucContactsIndividualsExisting_grd1\]; // Returns single object // Contains Match of both Table TR WITHOUT p_s_pgPrg*** for both retStr += table:first[id*=\ retStr += p_s_Table_ID; retStr += \; retStr += ]; retStr += tr:first[id*=; retStr += \; retStr += p_s_Row_ID; retStr += p_i_Row_Nbr; retStr += \; retStr += ]; break; case 2: // Example of what is returned: // table:first[id= \myUserControl_Ctl_tblucContactsIndividualsExisting_grd\] tr:first [id=\myUserControl_Ctl_trMainucContactsIndividualsExisting_grd1\] //table:first [id=myUserControl_Ctl_tblucContactsIndividualsExisting_grd] tr:first [id=myUserControl_Ctl_trMainucContactsIndividualsExisting_grd1] // Returns single object // Exact Match of both Table TR WITH p_s_pgPrg*** for both retStr += table:first[id=\ retStr += p_s_pgPrg; retStr += p_s_Table_ID; retStr += \; retStr += ]; retStr += tr:first[id=; retStr += \; retStr += p_s_pgPrg; retStr += p_s_Row_ID; retStr += p_i_Row_Nbr; retStr += \; retStr += ]; break; default: break; } //alert(retStr= + retStr); return retStr; } function jqSelectorStrTblRwObjMulti(p_i_How, p_s_pgPrg, p_s_Table_ID, p_s_Row_ID) { // Descriptions : Returns a MULTIPLE Table Rows Object jQuery Selector String // p_i_How : 1 or 2 - See switch case statements below // p_s_pgPrg: In asp.Net user controls, the ctl00_USER- CONTROL_PATHNAME_Ctl_ - If not using user-controls, leave . // p_s_Table_ID : table id= The id of the table // p_s_Row_ID : trid= The PARTIAL id of the table rows. // Since tablerow ID's are usually incremented (i.e. myRow1, myRow2, myRow3, etc), just pass the myRow without the number. // Usage //var h1 = jqSelectorStrTblRwObjMulti(2, ctl00_MyUserControl_Ctl_, MyTable, myRow) //$(h1).each(function() { //alert(this.id); //}); var retStr = ; switch (p_i_How) { case 1: // Example of what is returned: // table:first[id=\tblContactsGroupMembers\] tr:[id*= \trMainucContactsGroupsMembers\]; // Returns multiple object // Contains Match of both Table TR WITHOUT p_s_pgPrg*** for both retStr += table:first[id*=\ retStr += p_s_Table_ID; retStr += \; retStr += ]; retStr += tr:[id*=; retStr += \; retStr += p_s_Row_ID; retStr += \; retStr += ]; break; case 2: // Example of what is returned: // table:first[id= \ctl00_ctl00_cph_MainContent_cph_gmbDiscuss_ucDiscuss_Edit_Ctl_ucContactsGroupsMembers_Ctl_tblContactsGroupMembers \] tr:[id*= \ctl00_ctl00_cph_MainContent_cph_gmbDiscuss_ucDiscuss_Edit_Ctl_ucContactsGroupsMembers_Ctl_trMainucContactsGroupsMembers \]; //
[jQuery] Ajax error response text
Hi, I want to ask if there is a way to get the response body of an AJAX request that resulted in error (406 Not Acceptable). I've been looking for the response body in the XMLHttpRequest object that is returned with the error callback but the responseText only contains an empty string and the responseXML is null. I can see the response body through Firebug, though.
[jQuery] Re: [validate] [ajax]
You need to use ajaxSubmit and the submitHandler option. Here is an example: http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-demo.html Jörn On Tue, Sep 1, 2009 at 12:25 PM, HairyJimjames.d...@gmail.com wrote: Hi all, Still green with JQ. I have the following code which does work to a point except the validation runs but the form submits (via ajax) regardless. I know I need to change the code round, ajax in the the validate call - I think. Could do with help on this! $(document).ready(function() { $(#myform).validate(); $(#myform).ajaxForm({ success: function() { $('#contact_form').html(div id='message'/div); $('#message').html(h2Contact Form Submitted!/h2) .append(pWe will be in touch soon./p) .hide() .fadeIn(1500, function() { $('#message').append(img id='checkmark' src='/images/ check.png' /); }); } }); });
[jQuery] Re: How to Do This
Hi.. I don't see what you want to do... please be more specific :) On Sep 1, 1:23 pm, bharathbhooshan ambati bharathbhooshan.amb...@gmail.com wrote: Hi I have seen one site which consists of share/Email in a single tab. Can any body tell me hw to do this FYI.. site:http://www.networkworld.com/news/2009/083109-vmworld-xen-cloud-initia... Please find the attachment -- భరత్ భూషణ్ అంబటి imp.JPG 22KViewDownload
[jQuery] Re: Hover does not stop
Looking at the API the animate does have a callback function that you can use to do the stuff after the animation completes, for example $('#navigation').mouseout( function() { if(state == 1) { $(this).animate({left: '-210'},'slow', 'easein',function(){ //do stuff after animate finishes here }); state = 0; } } ); http://docs.jquery.com/Effects/animate On Sep 1, 11:22 am, Mario sevenartwo...@googlemail.com wrote: ok, i tried this and this works fairly. but another question is: can i change the state AFTER the animate() is finished? (there are still some problem when i touch certain points while sliding) $(function(){ var state = 0; $('#navigation').mouseover( function() { if(state == 0) {$(this).animate({left: '0'}, 'slow'); state = 1;}} ); $('#navigation').mouseout( function() { if(state == 1) {$(this).animate({left: '-210'}, 'slow'); state = 0;}} ); });
[jQuery] Re: How to detect window is scroll or not using window.scrollTo()
Hi Rupak, Not sure what what you mean by window is scroll and the question seems like more related to general JavaScript than jQuery in particular, but if you're trying to determine whether the window has been scrolled down, you can use the scrollTop property. For Firefox and IE, you'd check it as a property of document.documentElement; in Safari, as a property of document.body. This should find it for you: var windowScrollTop = document.documentElement.scrollTop || document.body.ScrollTop; if (windowScrollTop 0) { // do something } Note: the scrollTop property is part of IE's DHTML object model, not a w3c spec. Gecko and Webkit seem to implement it, so you should be relatively safe, but your mileage may vary on obscure browsers. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Sep 1, 2009, at 8:27 AM, Rupak wrote: Hi all, Is there a way to detect whether window is scroll or not .I am using window.scrollTo() function. Thanks Rupak
[jQuery] Re: and [tooltip] integration
I too was having the same problem, but just solved it. Something you said about needing to call it after the element was created sparked the solution. You need to specify the function inside a document.ready, however I use the shortcut. $(function(){ $('img').tooltip(); }); That should work. Chris On Aug 16, 4:08 pm, Matthew divmed...@gmail.com wrote: I am having trouble getting tooltips to work with the generated custom error message created by the validator plugin. I noticed that the tooltips do not work on dynamically generated elements unless the $ ('a').tooltip(); is called sometime after the element is actually created. My custom error message for validator would be something like: img src=images/forms/alert.png width=20 height=20 alt=FIX! id=input1 title=Please enter your name using letters only. No special characters are allowed. / Then I would need to call: $('img').tooltip(); Thanks for your ideas.
[jQuery] Re: Cycle: replace slide in running slideshow?
All these are Okay. But how will it work if there are huge contents in a div? Example, 100 rows in a DataGrid? -- View this message in context: http://www.nabble.com/Cycle%3A-replace-slide-in-running-slideshow--tp25213947s27240p25240553.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] image slide show with vertical thumbnail rotation
Hi All, Please help me out from this.i want a jquery image slide show with thumbnail rotator. Example for this is:--- http://demo.gavick.com/ something like this example Thanks vaneet
[jQuery] jQuery Validation Submitting without Validation in Firefox (validate)
Hi Guys, I've put together a pretty simple competition script - it's commented out below and you can find the demo at http://www.jakeisonline.com/stackoverflow/jqueryvalidation/page/ (you'll find the code at the bottom of the page) I am using a jquery plugin to achieve the validation: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ The problem is only in Firefox (3.5.2) - the form submits without any validation at all, and ignores the ajax. IE8 7 seem to be fine. I'm not really sure why Firefox is submitting the page with Refresh but IE isn't, I've looked over and over the code and can't find the error. Firebug is only finding errors in the jQuery library itself. Can anyone help?
[jQuery] Re: How to detect window is scroll or not using window.scrollTo()
@Rupak, I'm not sure if this answers your question, but all wrapped sets have a scrollTop() method that can be used to retrieve or set the scrollTop value. For example, to determine how far down the page has been scrolled, you can use: var top = jQuery(window).scrollTop(); The same method can be used to set the scrollTop value: // Scroll the root elements jQuery(html, body).scrollTop(100); By using the $().scrollTop() method, you should be able to get and/or set the scroll values on most elements. Hope that helps! On Sep 1, 8:58 am, Karl Swedberg k...@englishrules.com wrote: Hi Rupak, Not sure what what you mean by window is scroll and the question seems like more related to general JavaScript than jQuery in particular, but if you're trying to determine whether the window has been scrolled down, you can use the scrollTop property. For Firefox and IE, you'd check it as a property of document.documentElement; in Safari, as a property of document.body. This should find it for you: var windowScrollTop = document.documentElement.scrollTop || document.body.ScrollTop; if (windowScrollTop 0) { // do something } Note: the scrollTop property is part of IE's DHTML object model, not a w3c spec. Gecko and Webkit seem to implement it, so you should be relatively safe, but your mileage may vary on obscure browsers. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 1, 2009, at 8:27 AM, Rupak wrote: Hi all, Is there a way to detect whether window is scroll or not .I am using window.scrollTo() function. Thanks Rupak
[jQuery] Re: How to detect window is scroll or not using window.scrollTo()
Here's the docs: http://docs.jquery.com/CSS/scrollTop On Sep 1, 9:34 am, KeeganWatkins mkeeganwatk...@gmail.com wrote: @Rupak, I'm not sure if this answers your question, but all wrapped sets have a scrollTop() method that can be used to retrieve or set the scrollTop value. For example, to determine how far down the page has been scrolled, you can use: var top = jQuery(window).scrollTop(); The same method can be used to set the scrollTop value: // Scroll the root elements jQuery(html, body).scrollTop(100); By using the $().scrollTop() method, you should be able to get and/or set the scroll values on most elements. Hope that helps! On Sep 1, 8:58 am, Karl Swedberg k...@englishrules.com wrote: Hi Rupak, Not sure what what you mean by window is scroll and the question seems like more related to general JavaScript than jQuery in particular, but if you're trying to determine whether the window has been scrolled down, you can use the scrollTop property. For Firefox and IE, you'd check it as a property of document.documentElement; in Safari, as a property of document.body. This should find it for you: var windowScrollTop = document.documentElement.scrollTop || document.body.ScrollTop; if (windowScrollTop 0) { // do something } Note: the scrollTop property is part of IE's DHTML object model, not a w3c spec. Gecko and Webkit seem to implement it, so you should be relatively safe, but your mileage may vary on obscure browsers. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Sep 1, 2009, at 8:27 AM, Rupak wrote: Hi all, Is there a way to detect whether window is scroll or not .I am using window.scrollTo() function. Thanks Rupak
[jQuery] Professional Training
Does anyone know of college-level jQuery training/certification courses? I'm looking for something like Zend's PHP certification, but for jQuery. Thanks!
[jQuery] Port Prototype Code to jQuery?
Hi All, I want to refactor (port) the following PrototypeJS code to jQuery. I'm in the process of learning jQuery and currently stuck with porting this piece of code... Any idea's? [code] var total = 0; // For each fieldpair that has a child with a checked input // we get the sibling with a text input and add that value // to the total. $$(.fieldpair).each(function(fieldpair) { if (fieldpair.down(input:checked)) { var input = fieldpair.down('input:text'); total += parseInt(input.value); } }); [/code]
[jQuery] Re: jQuery Validation Submitting without Validation in Firefox (validate)
You've got a script error on submit. Set debug:true to stop the submit and look at the error. Jörn On Tue, Sep 1, 2009 at 3:45 PM, jake.d.hol...@googlemail.comjake.d.hol...@googlemail.com wrote: Hi Guys, I've put together a pretty simple competition script - it's commented out below and you can find the demo at http://www.jakeisonline.com/stackoverflow/jqueryvalidation/page/ (you'll find the code at the bottom of the page) I am using a jquery plugin to achieve the validation: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ The problem is only in Firefox (3.5.2) - the form submits without any validation at all, and ignores the ajax. IE8 7 seem to be fine. I'm not really sure why Firefox is submitting the page with Refresh but IE isn't, I've looked over and over the code and can't find the error. Firebug is only finding errors in the jQuery library itself. Can anyone help?
[jQuery] text without backspace get error in cluetip
Hi all, When i have: title=test|contentwithoutspacehover/a if the width of the text is more bigger than the configuration of cluetip, the text continues out of cluetip box. Have one way to solve that? Rly Thx
[jQuery] Re: text without backspace get error in cluetip
There is no simple, perfect way to combat this and keep the text and this happens in all browsers (as far as I know). You could look into javascript hyphenation or just hiding the overflow of the tooltip. khin wrote: Hi all, When i have: title=test|contentwithoutspacehover/a if the width of the text is more bigger than the configuration of cluetip, the text continues out of cluetip box. Have one way to solve that? Rly Thx
[jQuery] Re: text without backspace get error in cluetip
Thx for the reply! I will look for javascript hyphenation, and thx for the good tip (overflow). I will try this two ways. See ya
[jQuery] Looking to sell a jQuery Conference (Boston) ticket
Hello, I have a ticket for the jQuery conference in Boston in two weeks that I'm not going to be able to use. I'm looking to sell it for $150 (original ticket price). Please contact me if you're intersted. Thanks.
[jQuery] Re: JqModal / simpleModal - maintaining form state
If you are referring to the known issues I mentioned - since they are browser issues, Eric, thanks for the response. What issues did you mention that I missed? http://www.ericmmartin.com/projects/simplemodal_v12/#othernotes [under Known Issues] you'd need to implement something that woul keep track of state in those browsers. What code have you used for this? Just copy all values into an array on close and reset on open? I haven't had the need to solve this problem, so I don't have any code to share. So, you'd need to write something to save the state of radio buttons in both IE6 and IE7 and checkboxes in IE6. -Eric
[jQuery] Validate Text Field onblur (Bassistance Validation Plugin)
Anyone have an example on how to get the Bassistance Validation Plugin to validate text inputs onblur, I thought it did this by default but it is not happening for me. Thanks, Dave Buchholz.
[jQuery] Re: Validate Text Field onblur (Bassistance Validation Plugin)
To be clearer on what I am trying to achieve if nothing is entered I want to trigger an error Thanks, Dave Buchholz
[jQuery] Re: JqModal / simpleModal - maintaining form state
on 9/1/09 8:33 AM, Eric Martin at emarti...@gmail.com wrote: If you are referring to the known issues I mentioned - since they are browser issues, Eric, thanks for the response. What issues did you mention that I missed? http://www.ericmmartin.com/projects/simplemodal_v12/#othernotes [under Known Issues] you'd need to implement something that woul keep track of state in those browsers. What code have you used for this? Just copy all values into an array on close and reset on open? I haven't had the need to solve this problem, so I don't have any code to share. So, you'd need to write something to save the state of radio buttons in both IE6 and IE7 and checkboxes in IE6. -Eric Ok. I had not seen there was a persist option. Sorry 'bout that. I'll give it a shot. In my case, I am using checkboxes and I do not believe that there is intent to support IE6 at this time. I noticed the issue when testing with Safari and Firefox. I'll implement the persist option and see if it helps. Thanks Steffan --- T E L 6 0 2 . 7 9 3 . 0 0 1 4 | F A X 6 0 2 . 9 7 1 . 1 6 9 4 Steffan A. Cline stef...@execuchoice.net Phoenix, Az http://www.ExecuChoice.net USA AIM : SteffanC ICQ : 57234309 YAHOO : Steffan_Cline MSN : stef...@hldns.com GOOGLE: Steffan.Cline Lasso Partner Alliance Member ---
[jQuery] Unsubscribe
How do I unsubscribe this Newsgroup? Von meinem iPhone gesendet
[jQuery] Re: App like hangman
Problem fixed with: helper: clone in draggable element... On Aug 26, 8:19 pm, Boris Trivic trivu...@gmail.com wrote: Well, maybe you don't understand whats the problem, so here is screenshot: http://caraudio-rs.info/snapshot1.png Do you think it's the bug or my mistake? On Aug 25, 1:08 pm, Boris Trivic trivu...@gmail.com wrote: omg! I just opened it in Opera (Linux) and there is some kind of bug or what? Instead revert to original location, chars returns about 100-150px right... Can someone take a look and check if same problem occurs? Maybe I shoult report it to jQuery dev team? On Aug 25, 7:00 pm, Boris Trivic trivu...@gmail.com wrote: Yeah, sure, it imposible to convert object to string, object has methods and properties for that what I want. Wheathever, thanks a lot Brett one more time, you saved me. I finished a main part of project, there is still some little stufs to fix and correct. You can take a look on next link, if you want: http://caraudio-rs.info/nal_7/ On Aug 25, 12:17 am, Brett Ritter swift...@swiftone.org wrote: On Mon, Aug 24, 2009 at 11:24 AM, Boris Trivictrivu...@gmail.com wrote: I can success print ui.draggable to console, but how to convert it to string? I need to write it into some element with .innerHTML and I will probably use it in for loop... I think you are trying the hard way. ui.draggable is not a string, but a jQuery element. Use that as you see fit. For Hangman you're probably looking to copy either the text ( ui.draggable.text() ) or the html itself ( ui.draggable.html() ). If you need to clone the source you want ui.draggable.clone() (note that any events bound to the original are not bound to the clone unless you use live() ) Trying to convert a jQuery element to a string doesn't make sense unless you say what string you want - the text, the html, the id, these are all different strings. -- Brett Ritter / SwiftOne swift...@swiftone.org
[jQuery] Re: Validate Text Field onblur (Bassistance Validation Plugin)
Got it, this code onfocusout: function(element) { this.element (element); }, gives me what I am looking for Dave Buchholz
[jQuery] Is there a more efficient Method.
Hello, I use Jquery on a web page that serves constant updates to the User. I'm wondering if there is a more efficient method for updating the content divs. A simplified view of the layout I use is this. DIV ID = C1 class=content DIV Class=A/DIV DIV Class=B/DIV DIV Class=C/DIV DIV Class=D/DIV DIV Class=E/DIV DIV Class=F/DIV /DIV DIV ID = C2 class=content DIV Class=A/DIV DIV Class=B/DIV DIV Class=C/DIV DIV Class=D/DIV DIV Class=E/DIV DIV Class=F/DIV /DIV DIV ID = C3 class=content DIV Class=A/DIV DIV Class=B/DIV DIV Class=C/DIV DIV Class=D/DIV DIV Class=E/DIV DIV Class=F/DIV /DIV and so on.. Right now I have the server send back data via getJSON. The data coming back can contain updates for any of the Divs. But if a div is being updated, I update all of the children divs. The basic steps I follow are. I set a variable to the content div being updated. Then do individual finds to update the child div. Example to update content div 2 would be like. wrkDiv = $(#C2); wrkDiv.find(.A).html(data.DataA); wrkDiv.find(.B).html(data.DataB); wrkDiv.find(.C).html(data.DataC); wrkDiv.find(.D).html(data.DataD); wrkDiv.find(.E).html(data.DataE); wrkDiv.find(.F).html(data.DataF); I know it may be faster to pre_build a string of all the childern divs and then just replace the content div's HTML like this ($(#C2).html (div class=A ... and so on; but there may be more items under the content div than listed. Just wondering if there was an easier way. Thanks.
[jQuery] Re: couple of Cycle questions
Firstly, the images are different sizes and I'd really like to be able to centre them in the container div. Can't do it with CSS, so I'm guessing Cycle calculates positions from the top-left. Can this be overcome? The way to do that is to wrap your images in divs and center the images within the parent div. The divs then become the slides. 2nd question: I'm getting an error: Warning: Unknown pseudo-class or pseudo-element 'eq'. I'm blowed if I know why, as I thought I'd copied Mike's code! Dev. page is here:http://client-3.co.uk I didn't notice any error on that page.
[jQuery] Re: jQuery accordion menus flickering in IE 6 and 7
Thanks for the help. Turns out it has to do with the other cold (Coldfusion) on our ancient website somehow not playing well with jquery in IE. Cheers. On Sep 1, 3:27 am, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: This should be fixed in trunk. Give the latest stylesheet a try:http://jquery-ui.googlecode.com/svn/trunk/themes/base/ui.accordion.css Jörn On Mon, Aug 31, 2009 at 8:54 PM, Moose1rcob...@gmail.com wrote: I've seen several threads about this online but haven't not seen a solution that has worked so far. My accordions work great, but in IE 6 or 7, when the animation is done, the entire contents of that div flickerfor a split second. Is there a solution to this? My page is here:http://www.keene.edu/grants/internal_test1.cfm Thanks so much for any help on this.
[jQuery] Re: jQuery select where attribute ID less than
Then use indexes from the parent and :lt ( http://docs.jquery.com/Selectors/lt#index) aquaone On Tue, Sep 1, 2009 at 04:07, Namir namiras...@hotmail.com wrote: Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code: http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namirnamiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: Is there a more efficient Method.
maybe: $(#C2 div).each(function() { $(this).html( + data[Data + this.className]); } untested, but it seems like it would work fine *as long* as the only class applied to those children div's is that single letter or what not On Sep 1, 11:52 am, Keo kenneth.d.far...@gmail.com wrote: Hello, I use Jquery on a web page that serves constant updates to the User. I'm wondering if there is a more efficient method for updating the content divs. A simplified view of the layout I use is this. DIV ID = C1 class=content DIV Class=A/DIV DIV Class=B/DIV DIV Class=C/DIV DIV Class=D/DIV DIV Class=E/DIV DIV Class=F/DIV /DIV DIV ID = C2 class=content DIV Class=A/DIV DIV Class=B/DIV DIV Class=C/DIV DIV Class=D/DIV DIV Class=E/DIV DIV Class=F/DIV /DIV DIV ID = C3 class=content DIV Class=A/DIV DIV Class=B/DIV DIV Class=C/DIV DIV Class=D/DIV DIV Class=E/DIV DIV Class=F/DIV /DIV and so on.. Right now I have the server send back data via getJSON. The data coming back can contain updates for any of the Divs. But if a div is being updated, I update all of the children divs. The basic steps I follow are. I set a variable to the content div being updated. Then do individual finds to update the child div. Example to update content div 2 would be like. wrkDiv = $(#C2); wrkDiv.find(.A).html(data.DataA); wrkDiv.find(.B).html(data.DataB); wrkDiv.find(.C).html(data.DataC); wrkDiv.find(.D).html(data.DataD); wrkDiv.find(.E).html(data.DataE); wrkDiv.find(.F).html(data.DataF); I know it may be faster to pre_build a string of all the childern divs and then just replace the content div's HTML like this ($(#C2).html (div class=A ... and so on; but there may be more items under the content div than listed. Just wondering if there was an easier way. Thanks.
[jQuery] First Plugin Help
Could someone help me with the following, I'm just learning jquery and I had this working with a global variable (I know, bad, but I'm just learning). I have 4 draggable elements and $this.html(topZIndex); is only incrementing and displaying in the last one when I mouse over any of the 4 elements (can be seen here - http://www.iamcorbin.net/tEsT/test.php (click the drag button to turn it green first, only the gray box will change on mouseenter). I know this is a problem with my scope, and can be fixed easily, I'm just not sure what I'm doing wrong. Please Help. (function($){ $.fn.draganSort = function(options) { var opts = $.extend({}, $.fn.draganSort.defaults, options); return this.each(function() { $this = $(this); //make draggable $this.draggable({ containment: opts.container, ghosting: opts.ghost, opacity: opts.opac }); //set initial zIndex of draggable element $this.css('zIndex','300'); //hold the current top element Zlocation var topZIndex = 0; $this.mouseenter(function(){ //place element on top var divZIndex = $this.css('zIndex'); if($this.css('zIndex') topZIndex) topZIndex = $this.css('zIndex'); ++topZIndex; $this.html(topZIndex); $this.css('zIndex',topZIndex); }); //end mouseenter }); }; /*not sure how to implement yet, fixing above first $.fn.draganSort.destroy = function(){ $this = $(this) $this.draggable('destroy'); $this.unbind('mouseenter'); };*/ $.fn.draganSort.defaults = { container: 'parent', ghost: true, opac: 0.7 }; })(jQuery);
[jQuery] Re: Scrolling problem
Nevermind. After much trial and error, I pieced together some 'dirty' code to make it work. You can see it at the link above if you are having the same issues. Thanks! Kevin
[jQuery] Re: using ajaxForm for forms created -after- the document loads
Got it. $('#form1').ajaxForm(function() { alert(It helps to enter the correct form name.); });
[jQuery] Re: using ajaxForm for forms created -after- the document loads
$('#form1').ajaxForm(function() { alert(It helps to enter the correct form name.); }); :-) By the way, you don't need to guard against accidentally invoking ajaxForm more than once on the same form. ajaxForm won't bind the submit event multiple times. Just in case you were wondering about that.
[jQuery] Re: Is there a more efficient Method.
That might work. You could bind each child div with a custom event that would have it update itself from the passed in data. Then you could just trigger the event for that parent element. It would be interesting to see if it's faster since it doesn't have to search for the child selectors each time. Something like Setup: When page loads $(ClassChild).bind(update, function(E){UpdateChild(this, E);}) function UpdateChild (child, E) { $(child).html(E.data[$(child).className]); } Trigger: after new data is recieved. $(#C2 .ClassChild).trigger({type:update, E: data});
[jQuery] Re: not returning a JSON object
What happens if you change the type to text/html? (or not force any types.) On Sep 1, 1:03 am, defdev sp...@definitivedevelopment.co.uk wrote: Nick, thanks, but that didnt solve it either. return from the ajax/form submit: # alert(json); { message: why wont this work } # alert(json.message); undefined in firebug, the headers are correct (application/json) - im struggling to see whats wrong? On Sep 1, 11:55 am, Nick Fitzsimons n...@nickfitz.co.uk wrote: 2009/8/27 defdev sp...@definitivedevelopment.co.uk: from the server side: echo '{ message: why wont this work }'; That isn't valid JSON. According to the JSON spec http://json.org/, the name part of a name: value pair needs to be quoted with double quotes, and a strict JSON parser will enforce this. Changing it to echo '{ message: why wont this work }'; will fix it. Of course this may not actually fix your problem - I'm not sure how strict jQuery is about enforcing JSON parsing rules - but fixing it will eliminate one possible point of failure. Regards, Nick. -- Nick Fitzsimonshttp://www.nickfitz.co.uk/
[jQuery] Re: Jquery at Sears
Yeah, that's one way to discover you're not supposed to put stuff like that in your URLs. Another might be to listen to the only actual web- specific developers you have. There were a few smiles about that. I'm not saying that I was smiling. I'm also not saying that seeing that happen made my month. On Sep 1, 1:54 am, Jonathan Vanherpe (T T NV) jonat...@tnt.be wrote: Erik Reppen wrote: I should specify. It's not the little guy in the upper left although it might be worth plugging it into that. It's all the silly ones down below. On Aug 31, 11:58 pm, Erik Reppen erik.rep...@gmail.com wrote: What do you guys think of my precious. I'm not sure how many other elastic carousels there are out there, but I'm pretty proud of the auto-margin action. Please don't judge us (the FEDs at Sears) on the HTML. We don't actually have full control of the front end. It can scroll full pages but doesn't for other reasons that relate to not having full control of the front end among other things. I really liked the whole options hash thing from JQ in action so it's actually got a few options like switching to vertical for the carousel in our shopping whose item height is currently misaligned for other reasons that relate to not having full control of the front end. ;) Anyway I'm contemplating making a more generic and diversely featured one eventually and hope to start contributing when I have time. http://www.sears.com/shc/s/p_10153_12605_05775819000P?mv=rr aww, you guys fixed the bug where you could change the breadcrumbs displayed on the site just by changing the GET params. Too bad, that was a fun feature ;). The carousel seems to work pretty well, I'm sure it would be welcome if you turned it into a plugin and uploaded it somewhere. Jonathan -- Jonathan Vanherpe - Tallieu Tallieu NV - jonat...@tnt.be
[jQuery] Re: Looking to sell a jQuery Conference (Boston) ticket
The ticket has been spoken for. On Sep 1, 11:19 am, Eric estrathme...@gmail.com wrote: Hello, I have a ticket for the jQuery conference in Boston in two weeks that I'm not going to be able to use. I'm looking to sell it for $150 (original ticket price). Please contact me if you're intersted. Thanks.
[jQuery] Re: Port Prototype Code to jQuery?
can you send the html too?
[jQuery] Re: jQuery select where attribute ID less than
I tried using this $(span.message[id=+old_messages+]:lt(100)).hide (slide, {direction: up}, 2000); but it doesnt seem to be working correctly On Sep 1, 7:07 pm, aquaone aqua...@gmail.com wrote: Then use indexes from the parent and :lt (http://docs.jquery.com/Selectors/lt#index) aquaone On Tue, Sep 1, 2009 at 04:07, Namir namiras...@hotmail.com wrote: Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code:http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namirnamiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] All Elements Except 2
Hi, I'd like to select all elments on my page except 2. How would I do this? The elements I don't want to select are .bar6 and .homelink. Thanks.
[jQuery] Re: All Elements Except 2
Try the .not() method http://docs.jquery.com/Traversing/not On Sep 1, 8:28 pm, a1anm alanmoor...@gmail.com wrote: Hi, I'd like to select all elments on my page except 2. How would I do this? The elements I don't want to select are .bar6 and .homelink. Thanks.
[jQuery] Re: Unsubscribe
On the right side of the page, choose Edit my Membership There, you will be able to choose the No Email option. On Sep 1, 4:52 pm, Peter Stulzer pstul...@mac.com wrote: How do I unsubscribe this Newsgroup? Von meinem iPhone gesendet
[jQuery] Re: Unsubscribe
Thank you amuhlou. That's what I tried first but I still get all the mails. Is there another way to unsubscribe or can some moderator just kick me out of all the jQuery groups I'm in right now maybe? Thanks for any help. Peter Von meinem iPhone gesendet Am 01.09.2009 um 22:44 schrieb amuhlou amysch...@gmail.com: On the right side of the page, choose Edit my Membership There, you will be able to choose the No Email option. On Sep 1, 4:52 pm, Peter Stulzer pstul...@mac.com wrote: How do I unsubscribe this Newsgroup? Von meinem iPhone gesendet
[jQuery] Re: jQuery select where attribute ID less than
wouldnt work, even if I set the index to count the number of messages and subtract 20 and index those as sometimes there may be missing ID's as they may have been deleted. On Sep 1, 9:59 pm, James james.gp@gmail.com wrote: Try using just: $(span.message:lt(100)) If you want to remove elements that are on the bottom, you may want to use gt() instead of lt(). For example, suppose your code looks like: span class=message id=msg5test/span // index 0 span class=message id=msg4test/span // index 1 span class=message id=msg3test/span // index 2 span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 Doing: $(span.message:gt(2)).hide(); will hide: span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 because they have index greater-than 2. On Sep 1, 10:16 am, Namir namiras...@hotmail.com wrote: I tried using this $(span.message[id=+old_messages+]:lt(100)).hide (slide, {direction: up}, 2000); but it doesnt seem to be working correctly On Sep 1, 7:07 pm, aquaone aqua...@gmail.com wrote: Then use indexes from the parent and :lt (http://docs.jquery.com/Selectors/lt#index) aquaone On Tue, Sep 1, 2009 at 04:07, Namir namiras...@hotmail.com wrote: Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code:http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namirnamiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: jQuery select where attribute ID less than
It doesn't matter if they're missing IDs. You don't need the IDs. (Also, IDs cannot begin with a number. It's not valid.) All you need to know is how many new messages you received on your latest update (to determine how many old ones to remove), and your maximum number of messages to display at once. That is enough info to do what you want. On Sep 1, 11:07 am, Namir namiras...@hotmail.com wrote: wouldnt work, even if I set the index to count the number of messages and subtract 20 and index those as sometimes there may be missing ID's as they may have been deleted. On Sep 1, 9:59 pm, James james.gp@gmail.com wrote: Try using just: $(span.message:lt(100)) If you want to remove elements that are on the bottom, you may want to use gt() instead of lt(). For example, suppose your code looks like: span class=message id=msg5test/span // index 0 span class=message id=msg4test/span // index 1 span class=message id=msg3test/span // index 2 span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 Doing: $(span.message:gt(2)).hide(); will hide: span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 because they have index greater-than 2. On Sep 1, 10:16 am, Namir namiras...@hotmail.com wrote: I tried using this $(span.message[id=+old_messages+]:lt(100)).hide (slide, {direction: up}, 2000); but it doesnt seem to be working correctly On Sep 1, 7:07 pm, aquaone aqua...@gmail.com wrote: Then use indexes from the parent and :lt (http://docs.jquery.com/Selectors/lt#index) aquaone On Tue, Sep 1, 2009 at 04:07, Namir namiras...@hotmail.com wrote: Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code:http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namirnamiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] changing source of image, on click, first time size is wrong
I've got an image in a page that is hidden. When someone clicks on a link somewhere else in the page, I swap in a new source for: attr(src) Then I show() the container surrounding the image so it displays. Then I set some other elements near it to the same width. It's a popup and I don't want the title and caption to be wider than the image. On the FIRST CLICK, the size is set incorrectly. On the 2nd and every future click, the size is set correctly. I've tried replacing the attr(src) value and also replacing the entire HTML block with new HTML, but the problem happens both times. This happens on all browers. Any ideas? Thanks, Andy
[jQuery] setting height of popup multiple times, background image still shows in IE6
I have a hidden popup that I populate with content and it dynamically expands to the size of the content. I then show the popup. When a user clicks on another link, it populates the popup with longer or shorter content. When the content is SHORTER, it seems to show the background image that I'm using expanding to the height of the previous size of the popup. I've tried setting the height manually with JS, no luck. This only happens on IE6. Any suggestions would be much appreciated. Thanks, Andy
[jQuery] Re: jQuery select where attribute ID less than
Try using just: $(span.message:lt(100)) If you want to remove elements that are on the bottom, you may want to use gt() instead of lt(). For example, suppose your code looks like: span class=message id=msg5test/span // index 0 span class=message id=msg4test/span // index 1 span class=message id=msg3test/span // index 2 span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 Doing: $(span.message:gt(2)).hide(); will hide: span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 because they have index greater-than 2. On Sep 1, 10:16 am, Namir namiras...@hotmail.com wrote: I tried using this $(span.message[id=+old_messages+]:lt(100)).hide (slide, {direction: up}, 2000); but it doesnt seem to be working correctly On Sep 1, 7:07 pm, aquaone aqua...@gmail.com wrote: Then use indexes from the parent and :lt (http://docs.jquery.com/Selectors/lt#index) aquaone On Tue, Sep 1, 2009 at 04:07, Namir namiras...@hotmail.com wrote: Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code:http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namirnamiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: Unsubscribe
oh, looks like there's also an Unsubscribe button on that same Edit my Membership page. Have you tried that? On Sep 1, 8:52 pm, Peter Stulzer pstul...@mac.com wrote: Thank you amuhlou. That's what I tried first but I still get all the mails. Is there another way to unsubscribe or can some moderator just kick me out of all the jQuery groups I'm in right now maybe? Thanks for any help. Peter Von meinem iPhone gesendet Am 01.09.2009 um 22:44 schrieb amuhlou amysch...@gmail.com: On the right side of the page, choose Edit my Membership There, you will be able to choose the No Email option. On Sep 1, 4:52 pm, Peter Stulzer pstul...@mac.com wrote: How do I unsubscribe this Newsgroup? Von meinem iPhone gesendet
[jQuery] Re: jQuery select where attribute ID less than
Thats a very smart way of doing it. Thanks a lot. Also why is it invalid to start an ID as a number? I'm not receiving any errors by doing it. Should I instead set a custom attribute called msg_id and use that? On Sep 1, 10:21 pm, James james.gp@gmail.com wrote: It doesn't matter if they're missing IDs. You don't need the IDs. (Also, IDs cannot begin with a number. It's not valid.) All you need to know is how many new messages you received on your latest update (to determine how many old ones to remove), and your maximum number of messages to display at once. That is enough info to do what you want. On Sep 1, 11:07 am, Namir namiras...@hotmail.com wrote: wouldnt work, even if I set the index to count the number of messages and subtract 20 and index those as sometimes there may be missing ID's as they may have been deleted. On Sep 1, 9:59 pm, James james.gp@gmail.com wrote: Try using just: $(span.message:lt(100)) If you want to remove elements that are on the bottom, you may want to use gt() instead of lt(). For example, suppose your code looks like: span class=message id=msg5test/span // index 0 span class=message id=msg4test/span // index 1 span class=message id=msg3test/span // index 2 span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 Doing: $(span.message:gt(2)).hide(); will hide: span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 because they have index greater-than 2. On Sep 1, 10:16 am, Namir namiras...@hotmail.com wrote: I tried using this $(span.message[id=+old_messages+]:lt(100)).hide (slide, {direction: up}, 2000); but it doesnt seem to be working correctly On Sep 1, 7:07 pm, aquaone aqua...@gmail.com wrote: Then use indexes from the parent and :lt (http://docs.jquery.com/Selectors/lt#index) aquaone On Tue, Sep 1, 2009 at 04:07, Namir namiras...@hotmail.com wrote: Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code:http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namirnamiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: code not working
Hi Mike thank you for your interesting about my email and I wish If you accept my apologies for my mistakes in my first mail I have sent to group so my question finally I want create function fired after changed in textbox asp.net to validate the data type that inserted in this textbox as example: in textbox1 I want user to insert date data type only or in textbox2 I want user to insert numeric data type only or so on andre --- On Mon, 8/31/09, Michael Geary m...@mg.to wrote: From: Michael Geary m...@mg.to Subject: [jQuery] Re: code not working To: jquery-en@googlegroups.com Date: Monday, August 31, 2009, 10:05 PM Hmm... That probably sounded more critical than I meant it. I'm sorry, I didn't mean to chase you away! Everyone gets a free pass the first time. :-) So take a look at the rest of my previous message and see if there are any useful tips there, then fire away with any other questions... -Mike From: Michael Geary My goodness, please do not paste an entire copy of jquery.js in a message to this group. Your 120KB message was emailed to 20,000 people! All we need is the version number... From: ando this code is not working and I don't know the reasons for that I loaded the file jquery.js that I used
[jQuery] Howto: replace the current webpage with content from another webpage.
I am trying to define an onclick event to a form button, so that when I click this button, content from another webpage will overwrite this page (not open a new webpage). I've tried the below code (sample) which is not working. form action=/script method=post ..other elements../ input type=button name=jump value=Jump / /form script type=text/javascript $(':button[name=jump]').click(function() { $(document).load('/path/to/another_page.html'); }); /script Any suggestions, many thanks... lihao
[jQuery] Re: jQuery select where attribute ID less than
*http://www.w3.org/TR/html4/types.html#type-id ID* and *NAME* tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (-), underscores (_), colons (:), and periods (.). On Tue, Sep 1, 2009 at 14:44, Namir namiras...@hotmail.com wrote: Thats a very smart way of doing it. Thanks a lot. Also why is it invalid to start an ID as a number? I'm not receiving any errors by doing it. Should I instead set a custom attribute called msg_id and use that? On Sep 1, 10:21 pm, James james.gp@gmail.com wrote: It doesn't matter if they're missing IDs. You don't need the IDs. (Also, IDs cannot begin with a number. It's not valid.) All you need to know is how many new messages you received on your latest update (to determine how many old ones to remove), and your maximum number of messages to display at once. That is enough info to do what you want. On Sep 1, 11:07 am, Namir namiras...@hotmail.com wrote: wouldnt work, even if I set the index to count the number of messages and subtract 20 and index those as sometimes there may be missing ID's as they may have been deleted. On Sep 1, 9:59 pm, James james.gp@gmail.com wrote: Try using just: $(span.message:lt(100)) If you want to remove elements that are on the bottom, you may want to use gt() instead of lt(). For example, suppose your code looks like: span class=message id=msg5test/span // index 0 span class=message id=msg4test/span // index 1 span class=message id=msg3test/span // index 2 span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 Doing: $(span.message:gt(2)).hide(); will hide: span class=message id=msg2test/span // index 3 span class=message id=msg1test/span // index 4 because they have index greater-than 2. On Sep 1, 10:16 am, Namir namiras...@hotmail.com wrote: I tried using this $(span.message[id=+old_messages+]:lt(100)).hide (slide, {direction: up}, 2000); but it doesnt seem to be working correctly On Sep 1, 7:07 pm, aquaone aqua...@gmail.com wrote: Then use indexes from the parent and :lt ( http://docs.jquery.com/Selectors/lt#index) aquaone On Tue, Sep 1, 2009 at 04:07, Namir namiras...@hotmail.com wrote: Well its for a chat box and I want to remove old messages as new messages come in, so that there are 20 messages being shown at any one time, using = works perfectly if you add 1 new message because it selects the last message ID and subtracts 20, but if you add 2 messages then the first message will stay and the second message will disappear. Source code:http://www.forsakenrealms.co.cc/chat/?user=test On Aug 31, 11:01 pm, Michael Geary m...@mg.to wrote: Can you give us a hint what your DOM elements look like? For example, are these ID attributes in ascending order in the DOM? That would allow you to use a very fast binary search. If they are in an undetermined order then you're pretty much stuck with looping through them - but with thousands of them I would use a for loop rather than .each(). Or as Josh suggested, do something on the server. But it's hard to make any recommendations without knowing more about what you're doing. -Mike From:Namir Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50,Namir namiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Re: couple of Cycle questions
Mike, thank you for taking the trouble to reply :) I should have thought of the extra divs ... and am doing it now. Firefox is giving me the eq error under the CSS tab (your demo doesn't get it) but, as it doesn't seem to do anything, I won't worry about it! Cheers, Cherry. On Sep 1, 7:46 pm, Mike Alsup mal...@gmail.com wrote: Firstly, the images are different sizes and I'd really like to be able to centre them in the container div. Can't do it with CSS, so I'm guessing Cycle calculates positions from the top-left. Can this be overcome? The way to do that is to wrap your images in divs and center the images within the parent div. The divs then become the slides. 2nd question: I'm getting an error: Warning: Unknown pseudo-class or pseudo-element 'eq'. I'm blowed if I know why, as I thought I'd copied Mike's code! Dev. page is here:http://client-3.co.uk I didn't notice any error on that page.
[jQuery] Re: Port Prototype Code to jQuery?
This should work, at least the logic is transposed: $('.fieldpair').each(function(){ var self = $(this); if (self.find('input:checked').length){ total += +self.find('input:text').val(); } }); On Sep 1, 10:08 am, Jermaine jermaine2...@gmail.com wrote: Hi All, I want to refactor (port) the following PrototypeJS code to jQuery. I'm in the process of learning jQuery and currently stuck with porting this piece of code... Any idea's? [code] var total = 0; // For each fieldpair that has a child with a checked input // we get the sibling with a text input and add that value // to the total. $$(.fieldpair).each(function(fieldpair) { if (fieldpair.down(input:checked)) { var input = fieldpair.down('input:text'); total += parseInt(input.value); }}); [/code]
[jQuery] Re: jQuery select where attribute ID less than
Just for the record, ignoring performance and the invalid IDs, this could be done with filter(): $('span.class').filter(function(){ return this.id y; }); cheers, - ricardo On Aug 31, 6:57 pm, aquaone aqua...@gmail.com wrote: indeed. there's gotta be a better solution than this. if you can't control it and insist on using this method, $(span.class).each(function(){if($(this).attr('id')x){//do something}}); The performance on that will be crap. Please find an alternate solution e.g. .is(':gt'+x) aquaone On Mon, Aug 31, 2009 at 14:47, Josh Nathanson joshnathan...@gmail.comwrote: Any chance of doing what you need to do on the server, rather than the client? Are you stuck with the naming convention you're using, or can you name the spans a little differently or give them different class names to allow for better selection criteria? Given your current situation you'd have to loop through each span as Aquaone said, but I bet you might be able to think of a different way to approach the problem. -- Josh -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Namir Sent: Monday, August 31, 2009 2:33 PM To: jQuery (English) Subject: [jQuery] Re: jQuery select where attribute ID less than Still how would I do it with an each? I'd still need to select all the ones with an attribute of less than x, and it would be stupid to loop it from 1 to whatever as x can reach thousands. Do you have any other suggestions as to how I could do this? On Aug 31, 9:58 pm, aquaone aqua...@gmail.com wrote: id will be a string. AFAIK there's no built-in to parse it as a number and compare. you'd either have to .each() it or find another means of accomplishing what you are trying to do. aquaone On Mon, Aug 31, 2009 at 13:50, Namir namiras...@hotmail.com wrote: How can I do a less than in a select e.g. something like $.(span.class [id+ a_custom_variable +]) when I tried that it just selected all span of class with an ID attribute rather than where ID attribute is less than
[jQuery] Clickable autocomplete, like google
Hello I'm looking for an autocomplete that have no submit button, but that when the user click on the autocomplete keyword he would be redirected to another URL, that i will choose i'm using http://dyve.net/jquery/?autocomplete but even the author dont know how to make this example: user type goo then appears GOOGLE for him, when he click on GOOGLE the script send him to www.google.com it would be great if i could just do with the script i told you guys i'm not a programmer so i need like, the code itself, i know its too much to ask but i tried everything =\ thank you!
[jQuery] Why am I getting the error missing ) after argument list with this code?
Here's the code: beforeSend: function() { if( $('input[name='authorization']:checked').val() == 0) { $('#agree').fadeIn(500); return false; } else { $('#rentalAppLoader, #rentalAppProcessing').fadeIn(500); } }, and the error message is referencing the if ( $('input. line. It must be a syntax error, but I can't see it. And, btw, is the use of return false like that in the if portion an appropriate way to stop an ajax function if a value isn't what I want it to be? (In this case, authorization needs to be equal to 1 for the ajax function to proceed. Thanks for any feedback. Rick -- Ninety percent of the politicians give the other ten percent a bad reputation. - Henry Kissinger
[jQuery] [blockUI] - issue closing element modal
Hi- I need a modal window within an element on my page and the BlockUI plugin works great for this. The problem is that I want a button on the blockUI message that will close the block. I can't seem to get this to work. If I put the button elsewhere on the page, it works to close the block, but whenever the button is actually in the block div, it doesn't work. A close button in the block div works fine for full UI blocking, just not for element blocking. Is this possible? Any ideas would be much appreciated. Thanks. -Halsey code snippet $('#paneRecordHeader').click(function() { $('#paneRecord').block({ message: 'Legal Mumbo Jumbo input type=button id=btnAgree value=I Agree /'/p', css: { border: '1px solid #a00' } }); }); $('#btnAgree').click(function() { $('#paneRecord').unblock(); });
[jQuery] inconsistency in closest()
I've noticed inconsistent behavior with closest(). In my use case, it finds the expected ancestor initially. However, after a bit of DOM manipulation, it fails to find the expected ancestor even though the structure of DOM elements have not been modified in a way that should cause it not to find the correct ancestor. My contingency plan is to walk the parent() hierarchy manually. Not a big deal, but I'd like to know if anyone else has noticed this. Jeremy
[jQuery] Form built by ajax doesn't submit
Hello, I'm making a utility where you can upload multiple files at once then one by one write up a description for them as they display on the screen. This works for the first file. I send the request to a php file through ajax and the php file will respond with the next file and form. I can see the second file but the form will not submit into the same ajax/jquery call as before. This is what I have: $(.button).click(function() { var photo_ID = $(input#photo_ID).val(); var photo_title = $(input#photo_title).val(); var photo_description = $(textarea#photo_description).val(); var dataString = 'photo_title='+photo_title +'photo_description='+photo_description; alert(photo_title); $.ajax({ type: POST, url: form-parse.php?update_photo_text=+photo_ID, data: dataString, success: function() { $(#photo_wrapper).fadeOut(slow); setTimeout(function(){ get_next_photo() },1500); } }); return false; }); function get_next_photo() { $.post(form-parse.php?get_next_photo=yes, function(theResponse) { $('#photo_wrapper').html(theResponse); $('#photo_wrapper').fadeIn(slow); }); return false; } and the html form: form name=photo_text_update action= p Title of Photobr / input name=photo_title id=photo_title type=text size=45 / /p p Description of Photobr / textarea name=photo_description cols=80 rows=7 id=photo_description/textarea /p input type=hidden name=photo_ID id=photo_ID value=? echo $val; ? / input type=submit name=submit class=button id=submit_btn value=Send / /form what i get back from ajax looks exactly the same as the form above just with updated values. thanks
[jQuery] Re: - issue closing element modal
I need a modal window within an element on my page and the BlockUI plugin works great for this. The problem is that I want a button on the blockUI message that will close the block. I can't seem to get this to work. If I put the button elsewhere on the page, it works to close the block, but whenever the button is actually in the block div, it doesn't work. A close button in the block div works fine for full UI blocking, just not for element blocking. Is this possible? Any ideas would be much appreciated. Thanks. -Halsey code snippet $('#paneRecordHeader').click(function() { $('#paneRecord').block({ message: 'Legal Mumbo Jumbo input type=button id=btnAgree value=I Agree /'/p', css: { border: '1px solid #a00' } }); }); $('#btnAgree').click(function() { $('#paneRecord').unblock(); }); You need to move that click handler so that it is bound when the element exists in the DOM: $('#paneRecordHeader').click(function() { $('#paneRecord').block({ message: 'Legal Mumbo Jumbo input type=button id=btnAgree value=I Agree //p', css: { border: '1px solid #a00' } }); $('#btnAgree').click(function() { $('#paneRecord').unblock(); }); }); Alternatively, you could use the 'live' method.
[jQuery] Re: Why am I getting the error missing ) after argument list with this code?
if ( $('input[name='authorization']:checked').val() Clean up those quotes!
[jQuery] Re: Form built by ajax doesn't submit
what i get back from ajax looks exactly the same as the form above just with updated values. Instead of doing this: $(.button).click(function() { ... do this: $(.button).live('click', function() { ... http://docs.jquery.com/Events/live
[jQuery] Re: Howto: replace the current webpage with content from another webpage.
I am trying to define an onclick event to a form button, so that when I click this button, content from another webpage will overwrite this page (not open a new webpage). I've tried the below code (sample) which is not working. form action=/script method=post ..other elements../ input type=button name=jump value=Jump / /form script type=text/javascript $(':button[name=jump]').click(function() { $(document).load('/path/to/another_page.html'); }); /script To cause the browser to navigate to a different page, set the 'href' property of the window.location object: window.location.href = '/path/to/another_page.html'; https://developer.mozilla.org/en/DOM/window.location
[jQuery] Re: Why am I getting the error missing ) after argument list with this code?
Thanks, Mike...you're right, the quotes were the problem. Changing 'authorization' to authorization removed the error, but I didn't think single quotes within single quotes were a problem as long as they are paired correctly...guess I was wrong. (Not the first or last time!) Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Mike Alsup Sent: Tuesday, September 01, 2009 7:18 PM To: jQuery (English) Subject: [jQuery] Re: Why am I getting the error missing ) after argument list with this code? if ( $('input[name='authorization']:checked').val() Clean up those quotes!
[jQuery] Do events remain is memory when element is removed from DOM?
Is it necessary to unbind events from elements before removing them. As like the following: $(#list).find(li).unbind(hover).remove(); $(#list).html(List of New LI's); I'm building a plugin, and I want to know if the events listners will remain in memory, as code similar to the above will run every 5 seconds or so.
[jQuery] Re: First Plugin Help
I fixed it, if anyone has any tips for doing this more efficiently I would appreciate them. Also, I still need to learn how to add additional methods to my functions. For this one I'm trying to create a destroy method that will destroy the draggable and unbind the mouseenter zIndexing (function($){ $.fn.draganSort = function(options) { var opts = $.extend({}, $.fn.draganSort.defaults, options); //hold the current top element Zlocation var topZIndex = 0; return $(this).each(function() { $this = $(this); $this.draggable({ containment: opts.container, ghosting: opts.ghost, opacity: opts.opac }); //set initial zIndex of draggable element $this.css('zIndex','300'); $this.mouseenter(function(){ //place element on top var divZIndex = $(this).css('zIndex'); if($(this).css('zIndex') topZIndex) topZIndex = $(this).css('zIndex'); ++topZIndex; $(this).html(topZIndex); $(this).css('zIndex',topZIndex); }); //end mouseenter }); }; //$.fn.draganSort.extend({ destroy : function(){ // $this = $(this) // $this.draggable('destroy'); // $this.unbind('mouseenter'); //}; $.fn.draganSort.defaults = { container: 'parent', ghost: true, opac: 0.7 }; })(jQuery);
[jQuery] Re: Do events remain is memory when element is removed from DOM?
Correct me if I'm wrong, but I think Firefox does cleanup those events, but IE (v6 at least, I know) doesn't, so it creates memory leaks. It's probably good practice to unbind them. On Sep 1, 1:18 pm, roydukkey royduk...@gmail.com wrote: Is it necessary to unbind events from elements before removing them. As like the following: $(#list).find(li).unbind(hover).remove(); $(#list).html(List of New LI's); I'm building a plugin, and I want to know if the events listners will remain in memory, as code similar to the above will run every 5 seconds or so.
[jQuery] Get the element that I bind to live()
This is my Html: I am trying to get the element that I binded to live(), but always i am getting it's children. For example, this is my code: div id=div1 class=theClassbHye/b/div div id=div2 class=theClasspHello/p/div div id=div3 class=theClassdivbHello World/b/div/div /div script $('.theClass').live('click', function () { alert('I am trying to get the parent div id' + this.id + ', but i am always get the child element of the div')]) /script
[jQuery] Re: Get the element that I bind to live()
I don't want to use $(this).parents() My question is, if there is something like event.target that give me the element, that I attach the event to? (live event) On 2 ספטמבר, 03:42, Ami aminad...@gmail.com wrote: This is my Html: I am trying to get the element that I binded to live(), but always i am getting it's children. For example, this is my code: div id=div1 class=theClassbHye/b/div div id=div2 class=theClasspHello/p/div div id=div3 class=theClassdivbHello World/b/div/div /div script $('.theClass').live('click', function () { alert('I am trying to get the parent div id' + this.id + ', but i am always get the child element of the div')]) /script
[jQuery] Joining values in ajax load
Newbie here - Whenever I try to join variables I get results for first item (CustNum) only...PartNum returns as 'undefined'. Can someone tell me the problem with this code: $(document).ready(function() { $(.mybutton).click(function(event) { $(#myDiv).load(Test.asp?CustNum=+ $('#CustNum').val() +PartNum= + $('#PartNum').val()); }); });
[jQuery] Re: Joining values in ajax load
The code looks correct as far as I can see. You're going to have to provide some HTML of your #CustNum and #PartNum. On Sep 1, 2:54 pm, robert...@gmail.com robert...@gmail.com wrote: Newbie here - Whenever I try to join variables I get results for first item (CustNum) only...PartNum returns as 'undefined'. Can someone tell me the problem with this code: $(document).ready(function() { $(.mybutton).click(function(event) { $(#myDiv).load(Test.asp?CustNum=+ $('#CustNum').val() +PartNum= + $('#PartNum').val()); }); });
[jQuery] Re: Port Prototype Code to jQuery?
I think you can let the selector do all the work: var sum = 0; $(.fieldpair :checked + :text).each(function(){ sum += +this.value; }); It's rare I ever find a use for the sibling selector!
[jQuery] Re: Do events remain is memory when element is removed from DOM?
.remove() will also remove all event handlers and internally cached data http://docs.jquery.com/Manipulation/remove#expr On Sep 1, 4:18 pm, roydukkey royduk...@gmail.com wrote: Is it necessary to unbind events from elements before removing them. As like the following: $(#list).find(li).unbind(hover).remove(); $(#list).html(List of New LI's); I'm building a plugin, and I want to know if the events listners will remain in memory, as code similar to the above will run every 5 seconds or so.
[jQuery] Re: Do events remain is memory when element is removed from DOM?
Sorry, I can't verify your claim. But, you know for sure that ie6 leaks, then it's important that I unbind them. Thanks, James. On Sep 1, 8:20 pm, James james.gp@gmail.com wrote: Correct me if I'm wrong, but I think Firefox does cleanup those events, but IE (v6 at least, I know) doesn't, so it creates memory leaks. It's probably good practice to unbind them. On Sep 1, 1:18 pm, roydukkey royduk...@gmail.com wrote: Is it necessary to unbind events from elements before removing them. As like the following: $(#list).find(li).unbind(hover).remove(); $(#list).html(List of New LI's); I'm building a plugin, and I want to know if the events listners will remain in memory, as code similar to the above will run every 5 seconds or so.