[jQuery] jQuery Cycle - onBefore not running on first slide?
I'm using the onBefore() function to check for the tagName of the next element/slide. (If it's a jpg, png, flv, etc.) But it looks like the onBefore() function is not run on the first slide, because the function does not start on the first slide, but it does start properly when the slideshow has looped through and is back on the first slide. Is there a way to check for the tagName of the starting slide? -- View this message in context: http://www.nabble.com/jQuery-Cycle---onBefore-not-running-on-first-slide--tp21287122s27240p21287122.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: How to force a child page to open in iframe using jquery
But , i have such a scenario in my website Sir. and i am not doing it for ill purposes. And also i was searching something similar to what we have security=restricted in case of Internet Explorer.I want to implement the same in case of Firefox also. Plz suggest a way out :) thanks On Mon, Jan 5, 2009 at 12:41 AM, Kean shenan...@gmail.com wrote: The site used a frame braker for a reason, which is, I do not want my site be in someone elses frame. Please respect that or contact that site admin. On Jan 4, 2:43 am, AbhishEk mithuabh...@gmail.com wrote: plz help On Fri, Jan 2, 2009 at 5:44 PM, AbhishEk mithuabh...@gmail.com wrote: actually , the written javascript directly checks the url of browser nd if it finds a dff , it fires a location.replace command . Plz suggest how can i stop this default behaviour. On Fri, Jan 2, 2009 at 6:51 AM, Ricardo Tomasi ricardob...@gmail.com wrote: If the iframe has access to the parent frame it's on the same domain, then you have access to it right? I think there's nothing you can do to stop that. On Jan 1, 8:24 am, AbhishEk mithuabh...@gmail.com wrote: Hi, I have a WebPage on which i have an iframe inside which i open child pages . In one of the child pages following script is written script type=text/javascript if (self != top) { if (window.location.href.replace) top.location.replace(self.location.href); else top.location.href=self.document.href; } /script Which replaces my original url to its url and my page is gone .. is there any way using jquery that i can stop this page from bursting my iframe. Plz Help. Thanks in advance ~abhi
[jQuery] Re: drawing hierarchy schemes
While not a plugin, take a look at WriteMaps http://writemaps.com/ It was developed by Scott Jehl (of Filament Group, jQuery web site team, and jQuery UI interaction design team). It does just what you've displayed below, plus you can click to insert nodes (edit in place), drag and drop to move nodes, zoom in and out, drag and resize print preview. Great stuff! - Richard On Mon, Jan 5, 2009 at 6:26 AM, fl00r pedro.yanovic...@gmail.com wrote: Hi! How can I draw hierarchy schemes with jQuery? Have it got plugin for such stuff? I want to draw something like this: parent1 parent2 | | --- -- | | || child1-1 child1-2 child2-1 child2-2 etc. what do you think? =) thx!
[jQuery] Re: is accessing element by a class faster than accessing X element by ID
In any event, using the element's type together with a class selector will improve performance (otherwise every single element in the current context is checked for that class): $('div.toto').hide(); With a single element (or very few) using an id will probably be faster, but with 50+ elements, it might be faster to optimize the query instead and use a class plus context...: $('div.toto', '#container').hide(); or even, depending on the markup: $(' div.toto', '#container').hide(); (#container would be a div that contains all divs that belong to the class toto). But maybe that still wouldn't beat getElementById. Instead of us speculating here, you should simply test performance with FireBug yourself and see what works best: console.time('first'); $(div[id^='toto']).hide(); console.timeEnd('first'); console.time('second'); $('div.toto').hide(); console.timeEnd('second'); and so on... Depending on how you can adapt markup another option to improve performance would be to skip classes at all and just use context: div id=toto div/div div/div ... /div $('#toto div').hide(); Again, you'd need to verify what's the fastest. --Klaus On 5 Jan., 16:50, Christof Donat cdo...@gmx.de wrote: Hi, And try something like: var toto = []; $('.toto').each(function(){ var elem = $(this); toto[elem.attr('ref')] = elem; } Then, to hide the toto div with ref=1 or ref=2, just call: toto[1].hide(); toto[2].hide(); Why not use this: var toto = $('.toto'); toto[1].hide(); toto[2].hide(); That should be the same. Appart from that I think, that Jean Babtiste wanted to hide all elements at the same time. I'd expect his first ( $('.toto').hide() ) version to be usually faster, but I'm not shure about that. Christof
[jQuery] Re: How can I replace some text to another fragment? Wrappers don't support it
There is no ReplaceTo method in jQuery. You will need to create your own method. Appears some simple regex replace would work. Joe On Jan 5, 6:20 am, ranium ran...@gmail.com wrote: Hello. How can I replace some text to another fragment? For example, if I want to highlight all words ‘the’ with red color, I guess to do something like that $('body').ReplaceTo(‘%the%’, ‘span style=”background-color: red;”the/span’); I can’t do this with standard wrappers built-in on jQuery…
[jQuery] loading inbox using jquery imap combination
Hello every one ,,, I have already asked about imap, but no reply may u people not understand my question, so sorry i again i ask that question now, I want to load the inbox mail using the imap and jquery combination ,, And another is, please refer some good example's links for php jquery -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyer.hyperphp.com/ http://bharanikumariyerphp.site88.net/
[jQuery] Re: is accessing element by a class faster than accessing X element by ID
Hi, although i couldn't see one or the other or even the other being much faster considering that the selector would have to go through all the elements to see if *any* element on the page either (1) has the specified class or (2) has the specified id There is document.getElementById() which usually is really fast. If you use $('#toto1') uses that. That is why I am not really shure. If you use 50 or more times $('#toto'+n).hide() I'd expect the parser and the many function calls to take up quite some time, so that the whole construct should not be faster than using the class $('.toto').hide(). If all relevant Elements are in the same container, then I'd expect $('#container .toto').hide() to be a good solution. If all the relevant Elements are divs and there are more elements in the container, then $('#container div.toto').hide() might give you a bit more speed. Christof
[jQuery] Re: unset an array element? (returned via json)
delete response.content['header']; On Jan 5, 12:06 am, yellow1912 yellow1...@gmail.com wrote: First I have to admit I haven't got a clear understand of js object, array and associative array yet. I'm using jquery form to post a form, and I get back some data in json form, which is an array containing several fields (status, content, etc) The 'content' is an associative array which can have several elements, so I'm able to access it like this: response.content['header'], response.content['body'], response.content ['leftSidebox'], I wonder how I can unset one element in the above array (since i will have to loop through the rest of the elements and update the responding html. I wonder if something like this will work: response.content['header'] = undefined; jQuery.each(response.content, function(i, val) { if(val !== undefined) $(# + i).html(val); });
[jQuery] Re: $.click stops working after 2 clicks
How about copying and pasting the code in question. andy -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of revivedk Sent: Monday, January 05, 2009 11:06 AM To: jQuery (English) Subject: [jQuery] Re: $.click stops working after 2 clicks Unfortunately, no. On 5 Jan., 17:57, Liam Potter radioactiv...@gmail.com wrote: can we see a live example? revivedk wrote: Hi. I'm having a problem, where $(.showEvents).click(function(e) { var CalendarID = $($(e.target).parent()).parent(); if ( $('#data_'+CalendarID.attr('id').substr(4)).length 0 ) { $(e.target).attr({src : images/down.png}); $('#data_'+CalendarID.attr('id').substr(4)).hide(); } else { CalendarID.after('tr id=data_'+CalendarID.attr('id').substr (4)+'td colspan=4 style=background-color:'+CalendarID.css ('background-color')+';height:300px;Test/td/tr'); $(e.target).attr({src : images/up.png}); } }); will stop working after I have clicked the #showEvents 2 times. img border=0 class=showEvents src=images/down.png/
[jQuery] Re: is accessing element by a class faster than accessing X element by ID
Yea, seeing how the parse does have to construct your list based on classes, it will probably be faster to give it a scope limiter as mentioned (like all .toto in container). The fastest possible way to build the list would be, I think, to make all of your toto divs live inside one container, then just grab them like such: $('#toto_contaner').children(); Also, the reason I was using the ref=n method to set up the list was for a guaranteed ref 1 will be toto[1] every time bit, whereas if the list of toto elements changed it's position on page, there's no guarantee the elements would be the same. It's basically the difference between writing a mysql query that is explicit with column definitions, and one with implicit definitions. On Jan 5, 11:26 am, Christof Donat cdo...@gmx.de wrote: Hi, although i couldn't see one or the other or even the other being much faster considering that the selector would have to go through all the elements to see if *any* element on the page either (1) has the specified class or (2) has the specified id There is document.getElementById() which usually is really fast. If you use $('#toto1') uses that. That is why I am not really shure. If you use 50 or more times $('#toto'+n).hide() I'd expect the parser and the many function calls to take up quite some time, so that the whole construct should not be faster than using the class $('.toto').hide(). If all relevant Elements are in the same container, then I'd expect $('#container .toto').hide() to be a good solution. If all the relevant Elements are divs and there are more elements in the container, then $('#container div.toto').hide() might give you a bit more speed. Christof
[jQuery] Re: jQuery.Accordion - how can panels stay open?
I wonder why I thought that was regarding nested lists. Anyway, I fixed it using this code: jQuery('#channelGroups h3').click(function() { $(this).next('ul').slideToggle('fast') .siblings('ul:visible').slideUp('fast'); }); On 5 Jan, 13:56, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: http://docs.jquery.com/UI/Accordion#What_this_isn.27t Jörn On Mon, Jan 5, 2009 at 11:30 AM, spstieng spsti...@hotmail.com wrote: I'm successfully using the accordion herehttp://www.norwegianfashion.no (right side below videos). My question is: How can I leave a panel open after it's been clicked? If 'Andre lenker' is open and I click 'Designskoler', 'Andre lenker' panel is closed and 'Designskoler' opens. Offcourse I would like to close an open panel by clicking it again. I'm not sure if this is similar to what I need: http://groups.google.com/group/jquery-en/browse_thread/thread/51a8b8a... I tested it, but that broke the accordion functionality.
[jQuery] Computers
jQuery is a fast, concise, JavaScript Library that simplifies how you traverse HTML documents, handle events, perform animations, and add Ajax interactions to your web pages http://www.freewebs.com/industr/ http://www.mehndi.com/index.asp http://www.bidvertiser.com/bdv/bidvertiser/bdv_registration.dbm?source=104240046 http://www.cuteonly.com/?a_aid=cef9b4eaa_bid=e57e7b80 http://www.adbrite.com/mb/commerce/purchase_form.php?other_product_id=948824afsid=1 http://www.qiran.com/index.asp
[jQuery] http://dev.jquery.com/view/trunk disappeared
In my project, I was linking to some of the files under http://dev.jquery.com/view/trunk, which has recently disappeared. So now I'm linking directly to a specific version under http://dev.jquery.com/view. Some of the example code on this site still points to the trunk URL. Will the files at the URL reappear one day, or should the example code be pointed to a new place? One example is at http://docs.jquery.com/Plugins/Autocomplete ... where the example no longer works because of the incorrect plugin URL. I posted here instead of in plugins because my question is related to the entire trunk. Thanks, Mafi
[jQuery] Re: a:not named anchor
Indeed, thanks much... this is an extremely versatile and useful selector. Sorry for the double post. I deleted my initial message to fix a typo then had to re-post.
[jQuery] Re: Absolute Image location
And therein lies the problem. If you access /images, with the backslash, then it will look in the root OF THE SERVER Because you're running from a folder WITHIN that, (mytrial) the images won't be found - the correct path is /mytrial/images If you change this to work locally, be sure to change it back when you're uploading to a live site, if you're not using the /mytrial folder on that. Liam MarkAtHarvest wrote: Brian, Here is the html code on my http://localhost:8080/mytrial/admin.gsp, on my grails application. Just added this to find the absolute location for the images if I use div class=images images/down.gif image /div this goes to link, http://localhost:8080/mytrial/images/down.gif, and it does not find it. and if I change this to div class=images /images/down.gif image /div this goes to link http://localhost:8080/images/down.gif, its going to root intead of going to http://localhost:8080/mytrial/images/down.gif Thank you brian-263 wrote: On Sat, Jan 3, 2009 at 8:57 PM, MarkAtHarvest m...@harvestinfotech.com wrote: Brian, I am a newbie on CSS , let me try to change it and update you back on how it goes, thanks it seems this should work. BTW, changing to /images/down.gif, does not work at all, my images folder is at the root itself. Under the webapps folder of my java application. Even if I try to create a href link to /images/down.gif, it goes directly to http://images/down.gif instead of going to http://localhost:8080/images/down.gif. Then you've likely got something wrong with your application. Though it's obviously not a jQuery problem, how are you creating these img tags? No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.2/1874 - Release Date: 04/01/2009 16:32
[jQuery] Re: Combo box problem
http://www.ennovations.in/rentbhai/test.html u can see code on that page. This looks like it is working (tested in FF3).
[jQuery] Re: Best way to Toggle
Try: $(':checkbox').click(function(){ $(this).parents('fieldset').next('fieldset').slideToggle(); }); .parent() has a limited scope and will return only the parent elements. In the example you gave, fieldset is not a parent of input, but an ancestor. .parents() with the s at the end will do an ancestral search, not just a parental search. The .next() will return us the next sibling to the current element, which in the example would be fieldset#id_2 So just to walk thru it real quickly: $(this)// The checkbox getting clicked .parents('fieldset')// Fieldset#id_1, which contains the checkbox .next('fieldset')// Fieldset#id_2, which is the next fieldset adjacent to Fieldset#id_1 .slideToggle()// Applied to the last element returned from the jQuery chain, which is Fieldset#id_2 On Jan 5, 9:33 am, daweb davideprevo...@gmail.com wrote: Hi everybody and sorry about my English! This is my markup: fieldset id=id_1 dl class=campo-esteso dtnbsp;/dt dd input name=flag type=checkbox class=flag id=flag value=on tabindex=1 / span class=opzionaleToggle?!?!/span /dd /dl /fieldset fieldset id=id_2 // this fieldset is hidden Some input text type /fieldset I have 3 similar checkbox field next. What about the best way to toggle the next fieldset element. I'd try this, but it doesn't works: $(':checkbox').click(function(){ $(this).parent('fieldset').slideToggle(); }); Thank you all.
[jQuery] Re: Best way to Toggle
Oh God, it runs. Thank you!! On 5 Gen, 16:35, Eric \Hobo\ Garside gars...@gmail.com wrote: Try: $(':checkbox').click(function(){ $(this).parents('fieldset').next('fieldset').slideToggle(); }); .parent() has a limited scope and will return only the parent elements. In the example you gave, fieldset is not a parent of input, but an ancestor. .parents() with the s at the end will do an ancestral search, not just a parental search. The .next() will return us the next sibling to the current element, which in the example would be fieldset#id_2 So just to walk thru it real quickly: $(this) // The checkbox getting clicked .parents('fieldset') // Fieldset#id_1, which contains the checkbox .next('fieldset') // Fieldset#id_2, which is the next fieldset adjacent to Fieldset#id_1 .slideToggle() // Applied to the last element returned from the jQuery chain, which is Fieldset#id_2 On Jan 5, 9:33 am, daweb davideprevo...@gmail.com wrote: Hi everybody and sorry about my English! This is my markup: fieldset id=id_1 dl class=campo-esteso dtnbsp;/dt dd input name=flag type=checkbox class=flag id=flag value=on tabindex=1 / span class=opzionaleToggle?!?!/span /dd /dl /fieldset fieldset id=id_2 // this fieldset is hidden Some input text type /fieldset I have 3 similar checkbox field next. What about the best way to toggle the next fieldset element. I'd try this, but it doesn't works: $(':checkbox').click(function(){ $(this).parent('fieldset').slideToggle(); }); Thank you all.
[jQuery] Re: jQuery.Accordion - how can panels stay open?
http://docs.jquery.com/UI/Accordion#What_this_isn.27t Jörn On Mon, Jan 5, 2009 at 11:30 AM, spstieng spsti...@hotmail.com wrote: I'm successfully using the accordion here http://www.norwegianfashion.no (right side below videos). My question is: How can I leave a panel open after it's been clicked? If 'Andre lenker' is open and I click 'Designskoler', 'Andre lenker' panel is closed and 'Designskoler' opens. Offcourse I would like to close an open panel by clicking it again. I'm not sure if this is similar to what I need: http://groups.google.com/group/jquery-en/browse_thread/thread/51a8b8a5d7feb738/640f730a404df9f4?lnk=gstq=accordion#640f730a404df9f4 I tested it, but that broke the accordion functionality.
[jQuery] Re: a:not referencing named anchors
Docs: http://docs.jquery.com/Selectors/attributeStartsWith#attributevalue so: $(a:not([name^='#'])) On Jan 5, 4:28 am, Nikola nik.cod...@gmail.com wrote: Hi, I have a relatively simple question that I have been working on. I would like to exclude all anchors which reference named anchors from a particular function. What's the simplest way to express this? Although I don't quite know how I'd write this up I was thinking something along the lines of: Anchors that don't have # as the first character in their reference.. $(a:not # as the first character in their href).someaction Any ideas? Thanks much, Nikola
[jQuery] Re: a:not named anchor
This would probably work: $('a:not([href^=#])') --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 5, 2009, at 4:22 AM, Nikola wrote: Hi, I have a relatively simple question that I have been working on. I would like exclude all anchors that point to named anchors within a given page from a particular function. What's the simplest way to express this? Anchors that don't have # as the first character in their reference.. $(a:not # as the first character in their href).someaction Any ideas? Thanks much, Nikola
[jQuery] How to bind ajaxForm Vaildate via livequery on Form which was loaded via load() ??
Hi I'm loading a form via load() and want to Validate it via Validate Plugin and send it via ajaxForm() My Code looks like that: $('#detailform').livequery(function() { $(#detailform).validate(); var options = { url:'index.php?idcatside=33', target: '#contactformfield', method: 'GET', success:function() { } }; $('#detailform').ajaxForm(options); return false; }); My problem is now that everything is working but the form is sent immediatly, the script doesn't wait for the validation. How can I change that? THX cheers Philipp
[jQuery] Re: http://dev.jquery.com/view/trunk disappeared
Fixed! Thanks for the notification. Jörn On Mon, Jan 5, 2009 at 3:56 PM, Mafi Osori mafios...@gmail.com wrote: In my project, I was linking to some of the files under http://dev.jquery.com/view/trunk, which has recently disappeared. So now I'm linking directly to a specific version under http://dev.jquery.com/view. Some of the example code on this site still points to the trunk URL. Will the files at the URL reappear one day, or should the example code be pointed to a new place? One example is at http://docs.jquery.com/Plugins/Autocomplete ... where the example no longer works because of the incorrect plugin URL. I posted here instead of in plugins because my question is related to the entire trunk. Thanks, Mafi
[jQuery] Re: row highlite in jquery
You could try coding your table more specifically like this: table thead tr thmy header content/th /tr /thead tbody tr tdmy body content/td /tr /tbody /table Then in your jQuery code do: $(table tbody tr) Hope that helps :) On Jan 5, 9:18 am, vivekamar...@gmail.com wrote: Hello, I have following poblem to highlight row, i use followin jquery $(document).ready(function() { $(table tr).css ({ background:#ee }).hover( function() { $(this).css({ background: #DE2211 }); }, function() { $(this).css({ background: #ee }); } ); }); problem is it highlight every row even header on hovering..is there way to not highlight th only,,can i add condition that if table tr is th then background is #ee..i want to do without class pls perdon my english.
[jQuery] How to create a shoutbox using PHP and AJAX with jQuery
Hi there guys! It's me one more time... In this tutorial I try to show you how to create a shoutbox for your sites from scratch using PHP and AJAX (with jQuery). We will save all info in a mysql table, I hope you find it useful! http://yensdesign.com/2009/01/create-a-shoutbox-using-php-and-ajax-jquery/
[jQuery] Re: Combo box problem
I learned a lot from that bit of code, great example.
[jQuery] Re: a:not referencing named anchors
That is a thing of beauty! Thanks much.
[jQuery] Re: How is it possible to have click on each 'a href' menu item and ALSO have another 'a href' trigger as well?
Hi yvonney, Try jsbin.com, it's very useful. You just paste your html/javascript in there and it can be edited and shared. For the HTML you posted, this would work: $('ul.first a').click(function(){ var n = this.id.substring(3); //get the numbers only $('#vid'+n).click(); // same as trigger('click'); }); the name attribute for anchors has been deprecated in XHTML, the ID is enough. On Jan 5, 2:47 am, yvonney yvonn...@gmail.com wrote: Ricardo !!! Sorry to miss answering your question: YES... the first menu has UL around it... and that MAY be important as each of the THREE menu sections has a TOP item like so. (the id and name that I've added I left in though are not needed currently for this to work. Again: there's 3 sections here the first one. And YES, the videos will be in the exact same order so say, 15 menu items (first 5 below) and 5 in each section. And then for the videos. 15 videos ALL in the same order. The VIDEOS are NOT surrounded in anthing other than a main videos div. NO UL extra LI or anything. There's no reason not to though. Actually would that be best? Then I could hide them perhaps? li a id=onetitle name=onetitle href=#first class=firstSection1Landing/a ul class=first lia id=one1 name=one1 href=#first-asection 1 item 1/a/li lia id=one2 name=one2 href=#first-bSong Writing Session/a/ li lia id=one3 name=one3 href=#first-cITEM first-c/a/li lia id=one4 name=one4 href=#first-dITEM first-d/a/li lia id=one5 name=one5 href=#first-eITEM first-e/a/li /ul /li -- a href=vid1.flv id='vid1' name='vid1' class=media video1/a a href=vid2.flv id='vid2' name='vid2' class=mediavideo2/a a href=vid3.flv id='vid3' name='vid3' class=mediavideo3/a a href=vid4.flv id='vid3' name='vid4' class=mediavideo4/a a href=vid5.flv id='vid3' name='vid5' class=mediavideo5/a NOTE: the class 'media' HAS to remain in the above 5 video hrefs. I could put the videos anyways at all to make it work easier/better. Right now they are just links on the page that work. I guess I should have pointed out the little extra bit, that being the TOP menu's FIRST and main menu item which is name, Section1Landing. As you'd know it's the one that heads up the other 4 items and it should PERHAPS have something happen like a picture or short video occur when it's triggered. Doesn't have to though ... if I'm making things more complicated at this time. Though the video div is empty when the page loads. I'll think about that later. REALLY gonna stay up all night to see if I can get this working... Thanks to all. And thank you Ricardo for this most interesting help/ code. I will work on it now.
[jQuery] rows highlite issue..need help
Hello, I have following poblem to highlight row, i use followin jquery $(document).ready(function() { $(table tr).css({ background: #ee }).hover( function() { $(this).css({ background: #DE2211 }); }, function() { $(this).css({ background: #ee }); } ); }); problem is it highlight every row even header on hovering..is there way to not highlight th only,,can i add condition that if table tr is th then background is #ee..i want to do without class pls perdon my english.
[jQuery] how to validate multipart form?
i'm using jcarousel lite plugin to house a multi part form. i generate the next and back buttons dynamically with this code: function create_navigation(){ if ($(ol).size() 0) { // build links $(ol).each(function(i){ if($(this).children().size() 1) { $(this).parent().append(o.btnNavContainer); var carouselNavDiv = $(this).parent().children(o.btnNavTarget); $(carouselNavDiv).append(o.btnPrevHtml); $(this).children().each(function(j){ panelNum = j; linkNum = j+1; /* $(carouselNavDiv).append('li class=indicator # '+linkNum+' /li'); */ }); $(carouselNavDiv).append(o.btnNextHtml); } }); } } i want to validate each step of the form on click of next. i know that i need to interrupt the default click functionality and then once the step is valid, return function(go)just not sure how to do it in the context that i have if(o.btnNext){ $(o.btnNext).mouseover(function(){ isMouseOver = true; }); $(o.btnNext).mouseout(function(){ isMouseOver = false; }); $(o.btnNext).livequery(click,function() { return go(curr+o.scroll); }); } i tried to follow the demo and incorporate into the code that i already have but i can't seem to get it...i'm still learning my way through the language. i am using jquery validation plugin. thanks -- View this message in context: http://www.nabble.com/how-to-validate-multipart-form--tp21296516s27240p21296516.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: How to bind ajaxForm Vaildate via livequery on Form which was loaded via load() ??
Use the submitHandler option to handle the submit using ajaxSubmit: http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-demo.html Jörn On Mon, Jan 5, 2009 at 11:25 AM, ERP Evaluierungs leitfaden phil...@workx.at wrote: Hi I'm loading a form via load() and want to Validate it via Validate Plugin and send it via ajaxForm() My Code looks like that: $('#detailform').livequery(function() { $(#detailform).validate(); var options = { url:'index.php?idcatside=33', target: '#contactformfield', method: 'GET', success:function() { } }; $('#detailform').ajaxForm(options); return false; }); My problem is now that everything is working but the form is sent immediatly, the script doesn't wait for the validation. How can I change that? THX cheers Philipp
[jQuery] Re: How is it possible to have click on each 'a href' menu item and ALSO have another 'a href' trigger as well?
Great Ricardo! Couple of things to limit my possibility of making an error or needing to try/remember unnecessary variables: Q1: Does the doc type are at the top of the page matter much strict? transitional? xmlns line? Q2: Do I need an EXTRA }); at the bottom of the script just before /script? AND/OR should I try with $(document).ready(function() { right underscript type=text/javascript??? I have found that the $(document).ready(function(){ helped with other scripts. BELOW: script as I assume is correct based on your latest post above script type=text/javascript $('ul.first a').click(function(){ var n = this.id.substring(3); //get the numbers only $('#vid'+n).click(); // same as trigger('click'); }); /script --- I have now tried the script (though without all the 'variables trying' I will do shortly) And, sorry to have to say I'm not getting a result yet. Have only tried on my main page and with my barest possible test page. I'll keep trying and never give up! :--) Here's a snip of each of the 2 areas though I'm pretty sure I've chossen the right example of mine 'above' that you were referencing to use with your latest code. One menu line: lia id=one1 name=one1 href=#first-asection 1 item 1/a/ li One videos line: a href=vid1.flv id='vid1' name='vid1' class=media video1/a THIS above IS a part of what I would work with? yes I think. THANKS for the jsbin comment! And, I won't be surprised if right after I post this it starts working and I find it's some oversight of mine. Not working at the moment though only did my first tests though. y
[jQuery] Re: jQuery way
From the link you posted you have a library clash going on. Scriptaculous 1.5.1 conflicts with jQuery, even a basic ID query is not working correctly. prototype which is also included also seems to be broken. On Jan 5, 1:21 pm, Ricardo Tomasi ricardob...@gmail.com wrote: For some reason I was sure you were French! hehe :D In the HTML you posted, everything is inside the #header div. #menu_lateral_usuario and #footer are not children of #container, they are way deeper into the DOM tree. Since everything is contained by #header, it doesn't need to be excluded. The way to achieve what you want you have to also exclude all the element's parent's and inner children: var conteudo = $('#menu_lateral_usuario, #footer'); $(#container *).not(conteudo).not(conteudo.parents()).not (conteudo.find('*')).empty(); That seems to work with the HTML on pastebin. the page at barquettenet.net is timing out. abraço - ricardo On Jan 5, 3:53 am, Dirceu Barquette dirceu.barque...@gmail.com wrote: Hi Ricardo, Thats right! I know it works. But not with the dirty code of my job, both doesn't work... You are from Brazil like me. Don't you? See the project at:http://calango.barquettenet.net/~dirceu/cva //login:dirceu, password:senha you can click at Adicionar projetos. I injected jQuery at this link. My goal is bypass the dirty code, but... arg. using firebug, change the second index of array to menu_lateral_usuario. It seems like this: var a = $('#container')[0]; var arr = [header,menu_lateral_usuario,footer]; jQuery.each(a.childNodes,function(k,v){ if (jQuery.inArray(v.id,arr) 0){ $(v).empty(); } }) The above code works (imediatly after login...), but: $(#container).children().not(#header, #content, #footer).empty(); //JResig code and $(#container :not(#header, #content, #footer)).empty(); //Kean code Both these very clean codes doesn't work... I don't know why, but can help me in the future. You know for my poor english. I really appreciate your help to explain this problem. We can chat at gmail if you wish... Very special thanks to all! Dirceu Barquette 2009/1/5 Ricardo Tomasi ricardob...@gmail.com Both ways do work, as demonstrated here: http://jsbin.com/eruje/ On Jan 4, 5:53 pm, Dirceu Barquette dirceu.barque...@gmail.com wrote: Thanks a lot! But it doesn't works... :-( I get a really dirty code to add modules. I wish inject a pretty good jQuery code, but is impossible!!! thanks your attention! Dirceu Barquette 2009/1/4 John Resig jere...@gmail.com Maybe: $(#container).children().not(#header, #content, #footer).empty(); --John On Sun, Jan 4, 2009 at 2:05 PM, Dirceu Barquette dirceu.barque...@gmail.com wrote: Hi all! Is there better way? var elem = $('#container')[0]; var arr = [header,content,footer]; jQuery.each(elem.childNodes,function(k,v) { if (jQuery.inArray(v.id, arr) 0) { $(v).empty(); } }) thanks Dirceu Barquette
[jQuery] Re: a:not named anchor
Sure does, thanks much... this is an extremely useful and versatile selector. Sorry for double post. I deleted my initial message to fix a typo which in turn removed the entire message and I had to re-post it so now we have two.. ;)
[jQuery] how to get form data
Hi, I would like to keep jQuery('fo...@name=myform1]') in variable so that I can utilize it later on. var myForm = jQuery('fo...@name=myform1]'); Is there a way I can access checkbox state and check the size? The following does not work. It gives me 0 even when I some checkboxes are selected. alert( myForm.find('inp...@name=day]:checked').size() ); form name=myForm1 method=post input type=checkbox value=1 name=day /labelSun/label input type=checkbox value=2 name=day /labelMon/label ... /form form name=myForm2 method=post input type=checkbox value=1 name=day /labelSun/label input type=checkbox value=2 name=day /labelMon/label ... /form
[jQuery] Re: jQuery way
For some reason I was sure you were French! hehe :D In the HTML you posted, everything is inside the #header div. #menu_lateral_usuario and #footer are not children of #container, they are way deeper into the DOM tree. Since everything is contained by #header, it doesn't need to be excluded. The way to achieve what you want you have to also exclude all the element's parent's and inner children: var conteudo = $('#menu_lateral_usuario, #footer'); $(#container *).not(conteudo).not(conteudo.parents()).not (conteudo.find('*')).empty(); That seems to work with the HTML on pastebin. the page at barquettenet.net is timing out. abraço - ricardo On Jan 5, 3:53 am, Dirceu Barquette dirceu.barque...@gmail.com wrote: Hi Ricardo, Thats right! I know it works. But not with the dirty code of my job, both doesn't work... You are from Brazil like me. Don't you? See the project at:http://calango.barquettenet.net/~dirceu/cva //login:dirceu, password:senha you can click at Adicionar projetos. I injected jQuery at this link. My goal is bypass the dirty code, but... arg. using firebug, change the second index of array to menu_lateral_usuario. It seems like this: var a = $('#container')[0]; var arr = [header,menu_lateral_usuario,footer]; jQuery.each(a.childNodes,function(k,v){ if (jQuery.inArray(v.id,arr) 0){ $(v).empty(); } }) The above code works (imediatly after login...), but: $(#container).children().not(#header, #content, #footer).empty(); //JResig code and $(#container :not(#header, #content, #footer)).empty(); //Kean code Both these very clean codes doesn't work... I don't know why, but can help me in the future. You know for my poor english. I really appreciate your help to explain this problem. We can chat at gmail if you wish... Very special thanks to all! Dirceu Barquette 2009/1/5 Ricardo Tomasi ricardob...@gmail.com Both ways do work, as demonstrated here: http://jsbin.com/eruje/ On Jan 4, 5:53 pm, Dirceu Barquette dirceu.barque...@gmail.com wrote: Thanks a lot! But it doesn't works... :-( I get a really dirty code to add modules. I wish inject a pretty good jQuery code, but is impossible!!! thanks your attention! Dirceu Barquette 2009/1/4 John Resig jere...@gmail.com Maybe: $(#container).children().not(#header, #content, #footer).empty(); --John On Sun, Jan 4, 2009 at 2:05 PM, Dirceu Barquette dirceu.barque...@gmail.com wrote: Hi all! Is there better way? var elem = $('#container')[0]; var arr = [header,content,footer]; jQuery.each(elem.childNodes,function(k,v) { if (jQuery.inArray(v.id, arr) 0) { $(v).empty(); } }) thanks Dirceu Barquette
[jQuery] Re: Invalid Json Primitive
any comment regarding uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI) issue ? tep wrote: hi michael, I tried as you mentioned below but this time i am getting uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI) is the json with jquery right way to do that or i should try alternative ways ? could you share any sample with us if you have any ? thanks tep Michael Geary-3 wrote: Since you're not making a cross-domain request, why are you using JSONP instead of regular JSON? I would think you would just use JSON. JSONP uses a script element instead of XMLHttpRequest, so most of the Ajax parameters like the beforeSend and error functions don't apply. I don't know what the Invalid Json Primitive message means or where it's coming from, though. That's not part of jQuery. -Mike From: tep Any comment, waiting your help tep wrote: Hello all, I am trying to create a widget within .NET that's why using JSONP. But when i run the code below, i get the error 'Invalid Json Primitive' on client side before calling web service , how can i handle that ? function test2() { var params = '{wdgtype:1}'; $.ajax({ type: POST, url: service.aspx/GetWidget, data: params, // Set Method Params beforeSend: function(xhr) { xhr.setRequestHeader(Content-length, params.length); xhr.setRequestHeader(Content-type, application/json; charset=utf-8);}, contentType: application/json; charset=utf-8, dataType: jsonp, jsonp:onJsonPLoad, success: function(msg) { $(#showyrmwidget).html(msg.d); }, error: function(xhr,msg,e){ alert(xhr.responseText);//Error Callback } }); } function onJsonPLoad(data) { alert(data); } [WebMethod()] public static string GetWidget(string wdgtype) { return test; } Thanks -- View this message in context: http://www.nabble.com/Invalid-Json-Primitive-tp21229536s27240p 21248615.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Invalid-Json-Primitive-tp21229536s27240p2129.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] $(document).keydown only works in FireFox?
Hello, i tried to use jQuery for cross browser compatibility...I want to execute a click on a Button when Enter got pressed on page... but the following script still only works in FireFox and not in IE. can anyone help me or have an idea? script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function() { $(document).keydown(function(evt) { if (!evt) evt = window.event; if (evt.keyCode == 13) { // alert(enter captured from IE); $(btnCanelEditUser).click(); } else if (evt.which == 13) { //alert(enter captured from Gecko, Opera); $(btnCanelEditUser).click(); } }); }); /script -- View this message in context: http://www.nabble.com/%24%28document%29.keydown-only-works-in-FireFox--tp21289326s27240p21289326.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: $.click stops working after 2 clicks
Unfortunately, no. On 5 Jan., 17:57, Liam Potter radioactiv...@gmail.com wrote: can we see a live example? revivedk wrote: Hi. I'm having a problem, where $(.showEvents).click(function(e) { var CalendarID = $($(e.target).parent()).parent(); if ( $('#data_'+CalendarID.attr('id').substr(4)).length 0 ) { $(e.target).attr({src : images/down.png}); $('#data_'+CalendarID.attr('id').substr(4)).hide(); } else { CalendarID.after('tr id=data_'+CalendarID.attr('id').substr (4)+'td colspan=4 style=background-color:'+CalendarID.css ('background-color')+';height:300px;Test/td/tr'); $(e.target).attr({src : images/up.png}); } }); will stop working after I have clicked the #showEvents 2 times. img border=0 class=showEvents src=images/down.png/
[jQuery] Re: Combo box problem
ya i know mike ... but i have to hide another list when you select next like if you select hi it has to display list related to hi and when we select Hello it has to display list related to Hello and hide list related to hi ... but it not doing... if i put hide code in if() then it simply shows me both list without selecting any option... got my problem?? On Jan 5, 5:06 pm, Mike Alsup mal...@gmail.com wrote: http://www.ennovations.in/rentbhai/test.html u can see code on that page. This looks like it is working (tested in FF3).
[jQuery] Re: How to bind ajaxForm Vaildate via livequery on Form which was loaded via load() ??
Hi! THX for the Tipp! I changed my code and ended up with the following: $('#detailform').livequery(function() { $(#detailcalc form).validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ url: 'index.php?idcatside=33', target: '#contactformfield', method: 'GET' }); return false; } }); }); Whats happing now it that the page is reloading instead of fireing an ajaxSubmit(). What can cause that? THX dedian wrote: Hi I'm loading a form via load() and want to Validate it via Validate Plugin and send it via ajaxForm() My Code looks like that: $('#detailform').livequery(function() { $(#detailform).validate(); var options = { url:'index.php?idcatside=33', target: '#contactformfield', method: 'GET', success:function() { } }; $('#detailform').ajaxForm(options); return false; }); My problem is now that everything is working but the form is sent immediatly, the script doesn't wait for the validation. How can I change that? THX cheers Philipp -- View this message in context: http://www.nabble.com/How-to-bind-ajaxForm---Vaildate-via-livequery-on-Form-which-was--loaded-via-load%28%29tp21288622s27240p21291853.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Dateformat problem
Try: $(#sd,#ed).datepicker({dateFormat: '-mm-dd'}); On Mon, Jan 5, 2009 at 1:10 PM, Praveen praveen.python.pl...@gmail.comwrote: Hi all, i have tried my best and googled like anything but could not get the solution when i use datepicker (all are in small letters) script type=text/javascript src=/static_media/js/ ui.datepicker.js/script function customRange(input) { return {minDate: (input.id == sd ? $(#ed).datepicker (getDate) : null), maxDate: (input.id == ed ? $(#sd).datepicker(getDate) : null)}; $(#sd,#ed).datepicker({ beforeShow: customRange, showOn: both, }); sd and ed is id of the input box it shows me calendar with prev and next button. but its default format is mm/dd/ which i want to convert in -mm-dd but there wers not function i could found so i tried with Date.format = '-mm-dd'; and thought that could have helped me but could not. but when i use datePicker ('p' in CAPS letters) for which i am using script type=text/javascript src=/static_media/js/datePicker.js/ script function customRange1(input) { return {minDate: (input.id == date-pick2 ? $(#date- pick1).datePicker(getDate) : null), maxDate: (input.id == date-pick1 ? $(#date- pick2).datePicker(getDate) : null)}; date-pick1 and date-pick2 is id of the input box it shows me calendar with next button there is no previous button so i can not go to prev month of the current month. default format is mm/dd/ . when i am writing $.datePicker.setDateFormat('ymd','-'); // unicode its changing my format as i i wanted. but if i choose datepicker thenk i am not able to convert the format to -mm-dd if i choose datePicker then i am not able to go prev month of the current month and i am not getting why Date.format = '-mm-dd'; is not working. please visit this link where i have written the code http://dpaste.com/105471/ all the suggestion would be really appreciable. thanks -- Ca-Phun Ung + http://yelotofu.com + hongkong, zce, jquery, php, css, html
[jQuery] a:not named anchor
Hi, I have a relatively simple question that I have been working on. I would like exclude all anchors that point to named anchors within a given page from a particular function. What's the simplest way to express this? Anchors that don't have # as the first character in their reference.. $(a:not # as the first character in their href).someaction Any ideas? Thanks much, Nikola
[jQuery] Re: Change image to black and white on hover
Thanks for your replies everyone. Sorry for the delay, but I've been away for the festive season :) Ricardo, your script works well, but if I have multiple images on the same page using the same class it resets all images to the original image we stored! Is there a way I could use it on multiple images with the same class on the same page? I originally had these images in a CSS hover. But, the images are part of a CMS and I would have to teach the client how to create a single image with two states, which is not preferable. So, I would prefer to try a script if I can and keep it simple for them. If you could help me get it to work for multiple images, that would be great. All I really want to do is set the same image back to it's original state - was hoping it would be simple :) Thanks for your email too Ben, but I think it works the same way where I need to create two images. Thanks again. Paul 2009/1/3 BenV benv...@gmail.com Hello there! I think you can find a way to perform this effect with a nice transition here : http://jqueryfordesigners.com/image-cross-fade-transition/ I hope it'll help! Happy new year everyone On 23 déc 2008, 17:20, Paul Collins pauldcoll...@gmail.com wrote: Hi all, I'm a little stuck and I can't seem to get exactly what I'm after googling Basically, I want to apply the pixastic - desaturate function when I hover over an image. I've got this working, but I want to be able to remove that effect when I mouseout of the image. I can't for the life of me find something that removes a function, only a class. Here is my code, as I say the hover state works when you mouseover, but the mouseout effect isn't working: // greyscale on hover $(document).ready(function() { // find the div.fade elements and hook the hover event $(.test).hover(function() { $(this).pixastic(desaturate); }, function() { this.reset(); }); }); Thanks for any help. Paul 2008/12/23 Paul Collins pauldcoll...@gmail.com That works perfectly with JQuery Nathan. Thanks for your help. Much appreciated. Paul 2008/12/23 Nathan i...@nathan-adams.net It's not jQuery (although I believe it can act as a plugin - check the documentation), but this library covers that kind of image manipulation: http://www.pixastic.com/ On Dec 23, 9:16 pm, Paul Collins pauldcoll...@gmail.com wrote: Hi all, I'd like to think this is possible with JQuery, but can't find a reference online. Basically, I have a bunch of coloured logos that have links wrapped around them. I would like to create a hover state using JQuery that makes the images turn black and white when you hover over them. Currently I am creating two images - one colour, one black and white then swapping them out using CSS. If I could create the black and white hover state using JQuery, it would save a lot of hassle. Would appreciate any help.
[jQuery] Get Only Certain Parts of XML
Hi, I have just begun using jQuery to parse an xml file but have hit a snag and have spent the better part of Sunday trying to figure it out. What I am trying to do is return only a certain part group of the below (this is an example but relates to what I am trying to do). XML file students group=a student nameJohn Lewis/name age15/age phone714-555-6677/phone ssn111-22-3456/ssn /student student name post=Class PresidentGina Smith/name age16/age phone714-777-1234/phone ssn111-24-1784/ssn /student student nameCrystal Morgan/name age15/age phone626-566-6134/phone ssn555-66-7841/ssn /student /students students group=b student nameGina Lewis/name age15/age phone714-555-6677/phone ssn111-22-3456/ssn /student student nameJohn Smith/name age16/age phone714-777-1234/phone ssn111-24-1784/ssn /student student name post=Vice PresidentSmith Morgan/name age15/age phone626-566-6134/phone ssn555-66-7841/ssn /student /students JS File // File: readXML.js // Start function when DOM has completely loaded $(document).ready(function(){ // Open the students.xml file $.get(test.xml,{},function(xml){ // Build an HTML string myHTMLOutput = ''; myHTMLOutput += 'table width=98% border=1 cellpadding=0 cellspacing=0'; myHTMLOutput += 'thName/ththAge/ththPhone/ththSSN/ th'; // Run the function for each student tag in the XML file $('student',xml).each(function(i) { studentName = $(this).find(name).text(); studentAge = $(this).find(age).text(); studentPhone = $(this).find(phone).text(); studentSSN = $(this).find(ssn).text(); studentPost = $(this).find(name).attr(post); // Build row HTML data and store in string mydata = BuildStudentHTML (studentName,studentAge,studentPhone,studentSSN,studentPost); myHTMLOutput = myHTMLOutput + mydata; }); myHTMLOutput += '/table'; // Update the DIV called Content Area with the HTML string $(#ContentArea).append(myHTMLOutput); }); }); function BuildStudentHTML (studentName,studentAge,studentPhone,studentSSN,studentSE){ // Check to see if their is a post attribute in the name field if ((studentPost) != undefined){ studentPostHTML = strong( + studentPost + )/strong; } else { studentPostHTML = ; } // Build HTML string and return output = ''; output += 'tr'; output += 'td'+ studentName + studentPostHTML + '/td'; output += 'td'+ studentAge +'/td'; output += 'td'+ studentPhone +'/td'; output += 'td'+ studentSSN +'/td'; output += '/tr'; return output; } Output NameAge Phone SSN John Lewis 15 714-555-6677111-22-3456 Gina Smith(Class President) 16 714-777-1234111-24-1784 Crystal Morgan 15 626-566-6134555-66-7841 Gina Lewis 15 714-555-6677111-22-3456 John Smith 16 714-777-1234111-24-1784 Smith Morgan(Vice President)15 626-566-6134555-66-7841 What I would really like to get it just the first three students (group a) or just the last three students (group b). I am sure there is an easy way to do this but I have just spent so much time trying different things and nothing I seem to do works.
[jQuery] Re: http://dev.jquery.com/view/trunk disappeared
What was the problem Joern, svk was not synchronizing? On Mon, Jan 5, 2009 at 10:14 AM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Fixed! Thanks for the notification. Jörn On Mon, Jan 5, 2009 at 3:56 PM, Mafi Osori mafios...@gmail.com wrote: In my project, I was linking to some of the files under http://dev.jquery.com/view/trunk, which has recently disappeared. So now I'm linking directly to a specific version under http://dev.jquery.com/view. Some of the example code on this site still points to the trunk URL. Will the files at the URL reappear one day, or should the example code be pointed to a new place? One example is at http://docs.jquery.com/Plugins/Autocomplete ... where the example no longer works because of the incorrect plugin URL. I posted here instead of in plugins because my question is related to the entire trunk. Thanks, Mafi -- Eduardo Lundgren Software Engineer Liferay, Inc. Enterprise. Open Source. For Life.
[jQuery] Re: rows highlite issue..need help
Make use of .not() to filter out elements, in your case $(table tr).not('th') should give the wanted result. On Mon, Jan 5, 2009 at 6:19 AM, vivekamar...@gmail.com wrote: Hello, I have following poblem to highlight row, i use followin jquery $(document).ready(function() { $(table tr).css({ background: #ee }).hover( function() { $(this).css({ background: #DE2211 }); }, function() { $(this).css({ background: #ee }); } ); }); problem is it highlight every row even header on hovering..is there way to not highlight th only,,can i add condition that if table tr is th then background is #ee..i want to do without class pls perdon my english. -- Isaak Malik Web Developer
[jQuery] Re: Absolute Image location
awesome, /mytrail/images/down.gif works, only problem now I need to solve is if I flatten this war file and install it on the domain itself(i.e at http://localhost instead of http://localhost/mytrial) , then I need to change the javascript to /images/down.gif Thank you Richard, Brian, for solving my problem. richard.aday wrote: From what you wrote the way the link is being handled looks correct. Why don't you try: /mytrail/images/down.gif . On Jan 3, 6:54 pm, MarkAtHarvest m...@harvestinfotech.com wrote: Brian, Here is the html code on myhttp://localhost:8080/mytrial/admin.gsp, on my grails application. Just added this to find the absolute location for the images if I use div class=images images/down.gif image /div this goes to link,http://localhost:8080/mytrial/images/down.gif, and it does not find it. and if I change this to div class=images /images/down.gif image /div this goes to linkhttp://localhost:8080/images/down.gif, its going to root intead of going tohttp://localhost:8080/mytrial/images/down.gif Thank you brian-263 wrote: On Sat, Jan 3, 2009 at 8:57 PM, MarkAtHarvest m...@harvestinfotech.com wrote: Brian, I am a newbie on CSS , let me try to change it and update you back on how it goes, thanks it seems this should work. BTW, changing to /images/down.gif, does not work at all, my images folder is at the root itself. Under the webapps folder of my java application. Even if I try to create a href link to /images/down.gif, it goes directly to http://images/down.gifinstead of going to http://localhost:8080/images/down.gif. Then you've likely got something wrong with your application. Though it's obviously not a jQuery problem, how are you creating these img tags? -- View this message in context:http://www.nabble.com/Absolute-Image-location-tp21258855s27240p212724... Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Absolute-Image-location-tp21258855s27240p21292345.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jQuery.Accordion - how can panels stay open?
Nested accordions actually work just fine. You just need to set clearStyle:true. Anyway, nice to know that was what you're looking for. Jörn On Mon, Jan 5, 2009 at 2:12 PM, spstieng spsti...@hotmail.com wrote: I wonder why I thought that was regarding nested lists. Anyway, I fixed it using this code: jQuery('#channelGroups h3').click(function() { $(this).next('ul').slideToggle('fast') .siblings('ul:visible').slideUp('fast'); }); On 5 Jan, 13:56, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: http://docs.jquery.com/UI/Accordion#What_this_isn.27t Jörn On Mon, Jan 5, 2009 at 11:30 AM, spstieng spsti...@hotmail.com wrote: I'm successfully using the accordion herehttp:// www.norwegianfashion.no (right side below videos). My question is: How can I leave a panel open after it's been clicked? If 'Andre lenker' is open and I click 'Designskoler', 'Andre lenker' panel is closed and 'Designskoler' opens. Offcourse I would like to close an open panel by clicking it again. I'm not sure if this is similar to what I need: http://groups.google.com/group/jquery-en/browse_thread/thread/51a8b8a. .. I tested it, but that broke the accordion functionality.
[jQuery] new york city js jquery tutor wanted for few months (paid)
I'm a front-end web developer specializing in css/html. I would like to boost my js knowledge asap. I'm looking for an advanced js/jquery person (who is also adamant! about web standards and accessibility) in New York City metro area that is willing to tutor me for a couple hours on a weekly or biweekly basis for some months to start. I have some stuff that I'm developing and will also need some general js reviews as my knowledge is sort of piecemeal. I have been working in web for the last 5/6 years, so I'm no novice to the medium...javascript, however, has always sort of been a bit difficult for me to learn/master. Paid gig; will work out terms. I'm hoping that this can be a fun couple hours for us both. Please reply to author if you are interested and/or for more information. Thanks. ps. hope it is okay to post this here...figured i had a better shot here than craigslist -- View this message in context: http://www.nabble.com/new-york-city-js---jquery-tutor-wanted-for-few-months-%28paid%29-tp21297101s27240p21297101.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: How to bind ajaxForm Vaildate via livequery on Form which was loaded via load() ??
Try to set debug:true to prevent the default submit, that way you should be able to see any errors thrown. $(#form).validate({ debug: true, ... }); Jörn On Mon, Jan 5, 2009 at 3:22 PM, dedian phil...@workx.at wrote: Hi! THX for the Tipp! I changed my code and ended up with the following: $('#detailform').livequery(function() { $(#detailcalc form).validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ url: 'index.php?idcatside=33', target: '#contactformfield', method: 'GET' }); return false; } }); }); Whats happing now it that the page is reloading instead of fireing an ajaxSubmit(). What can cause that? THX dedian wrote: Hi I'm loading a form via load() and want to Validate it via Validate Plugin and send it via ajaxForm() My Code looks like that: $('#detailform').livequery(function() { $(#detailform).validate(); var options = { url:'index.php?idcatside=33', target: '#contactformfield', method: 'GET', success:function() { } }; $('#detailform').ajaxForm(options); return false; }); My problem is now that everything is working but the form is sent immediatly, the script doesn't wait for the validation. How can I change that? THX cheers Philipp -- View this message in context: http://www.nabble.com/How-to-bind-ajaxForm---Vaildate-via-livequery-on-Form-which-was--loaded-via-load%28%29tp21288622s27240p21291853.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: How is it possible to have click on each 'a href' menu item and ALSO have another 'a href' trigger as well?
Hi Ricardo... http://jsbin.com/ahuce Here's the jsbin attempt I did I made a simple basic example using latest code etc. clicking on the video links get :: This URL does not have any code saved to it. THOUGH clicking on either of the actual ul class=first links gets nothing... I think I have learned a lot thru all this very good really. Could you see the jsbin example maybe? Hope the JQ is in there seems to be!
[jQuery] Re: How to bind ajaxForm Vaildate via livequery on Form which was loaded via load() ??
Hi THX for ur fast reply. Tried to use the debug, like that: $(#detailform).livequery(function() { $(#detailform).validate({ debug: true, submitHandler: function(form) { jQuery(form).ajaxSubmit({ url: 'index.php?idcatside=33', target: '#contactformfield', method: 'GET' }); return false; } }); }); It's still the same, the page just reloads. Maybe the whole design is wrong??? What else can I try? Cheers Jörn Zaefferer-2 wrote: Try to set debug:true to prevent the default submit, that way you should be able to see any errors thrown. $(#form).validate({ debug: true, ... }); Jörn On Mon, Jan 5, 2009 at 3:22 PM, dedian phil...@workx.at wrote: Hi! THX for the Tipp! I changed my code and ended up with the following: $('#detailform').livequery(function() { $(#detailcalc form).validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ url: 'index.php?idcatside=33', target: '#contactformfield', method: 'GET' }); return false; } }); }); Whats happing now it that the page is reloading instead of fireing an ajaxSubmit(). What can cause that? THX dedian wrote: Hi I'm loading a form via load() and want to Validate it via Validate Plugin and send it via ajaxForm() My Code looks like that: $('#detailform').livequery(function() { $(#detailform).validate(); var options = { url:'index.php?idcatside=33', target: '#contactformfield', method: 'GET', success:function() { } }; $('#detailform').ajaxForm(options); return false; }); My problem is now that everything is working but the form is sent immediatly, the script doesn't wait for the validation. How can I change that? THX cheers Philipp -- View this message in context: http://www.nabble.com/How-to-bind-ajaxForm---Vaildate-via-livequery-on-Form-which-was--loaded-via-load%28%29tp21288622s27240p21291853.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/How-to-bind-ajaxForm---Vaildate-via-livequery-on-Form-which-was--loaded-via-load%28%29tp21288622s27240p21292199.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] row highlite in jquery
Hello, I have following poblem to highlight row, i use followin jquery $(document).ready(function() { $(table tr).css ({ background:#ee }).hover( function() { $(this).css({ background: #DE2211 }); }, function() { $(this).css({ background: #ee }); } ); }); problem is it highlight every row even header on hovering..is there way to not highlight th only,,can i add condition that if table tr is th then background is #ee..i want to do without class pls perdon my english.
[jQuery] Select first sibling
Hi How do get to select the FIRST sibling ? The problem with this is that it fades out all the siblings. dt div a href=# onclick=$(this).parent().parent().siblings().fadeTo (1500, 0.3);Click here/a /div /dt dd /dd Thanks
[jQuery] Re: how to get form data
It might help if you give your elements IDs and use those as selectors. I'm not even certain that the form tag can have a name attribute. On Mon, Jan 5, 2009 at 1:43 PM, bob xoxeo...@gmail.com wrote: Hi, I would like to keep jQuery('fo...@name=myform1]') in variable so that I can utilize it later on. var myForm = jQuery('fo...@name=myform1]'); Is there a way I can access checkbox state and check the size? The following does not work. It gives me 0 even when I some checkboxes are selected. alert( myForm.find('inp...@name=day]:checked').size() ); form name=myForm1 method=post input type=checkbox value=1 name=day /labelSun/label input type=checkbox value=2 name=day /labelMon/label ... /form form name=myForm2 method=post input type=checkbox value=1 name=day /labelSun/label input type=checkbox value=2 name=day /labelMon/label ... /form
[jQuery] Re: Disable Page Refresh
Here is a link with a discussion about your topic: http://www.webmasterworld.com/forum91/4388.htm The discussion has a general consensus that no is the answer. However, there is some code to hack something together. In my opinion, it's just not worth it. You should create your application to handle refreshes, even if in the worst case it means the user has to start from scratch. On Jan 3, 9:17 am, Himanshu Rathore mymailsubscript...@gmail.com wrote: Hi, Is there a way to disable page refresh option - F5, Ctrl+F5, Menu Refresh / Reload, Right Click Refresh? Regards, Himanshu Rathore
[jQuery] Re: Combo box problem
Off the top of my head, why not just use one list and append the relevant text?
[jQuery] Re: how to get form data
'name' is a valid attribute for the form tag. you can access a specific form on a page via document.forms['formName'] (pre-jQuery, of course) :) your point remains, however, an id attribute would indeed make referencing it easier ('#myFormID'). On Mon, Jan 5, 2009 at 11:18 AM, brian bally.z...@gmail.com wrote: It might help if you give your elements IDs and use those as selectors. I'm not even certain that the form tag can have a name attribute. On Mon, Jan 5, 2009 at 1:43 PM, bob xoxeo...@gmail.com wrote: Hi, I would like to keep jQuery('fo...@name=myform1]') in variable so that I can utilize it later on. var myForm = jQuery('fo...@name=myform1]'); Is there a way I can access checkbox state and check the size? The following does not work. It gives me 0 even when I some checkboxes are selected. alert( myForm.find('inp...@name=day]:checked').size() ); form name=myForm1 method=post input type=checkbox value=1 name=day /labelSun/label input type=checkbox value=2 name=day /labelMon/label ... /form form name=myForm2 method=post input type=checkbox value=1 name=day /labelSun/label input type=checkbox value=2 name=day /labelMon/label ... /form -- I have failed as much as I have succeeded. But I love my life. I love my wife. And I wish you my kind of success.
[jQuery] Re: is accessing element by a class faster than accessing X element by ID
Hi, And try something like: var toto = []; $('.toto').each(function(){ var elem = $(this); toto[elem.attr('ref')] = elem; } Then, to hide the toto div with ref=1 or ref=2, just call: toto[1].hide(); toto[2].hide(); Why not use this: var toto = $('.toto'); toto[1].hide(); toto[2].hide(); That should be the same. Appart from that I think, that Jean Babtiste wanted to hide all elements at the same time. I'd expect his first ( $('.toto').hide() ) version to be usually faster, but I'm not shure about that. Christof
[jQuery] Re: Absolute Image location
From what you wrote the way the link is being handled looks correct. Why don't you try: /mytrail/images/down.gif . On Jan 3, 6:54 pm, MarkAtHarvest m...@harvestinfotech.com wrote: Brian, Here is the html code on myhttp://localhost:8080/mytrial/admin.gsp, on my grails application. Just added this to find the absolute location for the images if I use div class=images images/down.gif image /div this goes to link,http://localhost:8080/mytrial/images/down.gif, and it does not find it. and if I change this to div class=images /images/down.gif image /div this goes to linkhttp://localhost:8080/images/down.gif, its going to root intead of going tohttp://localhost:8080/mytrial/images/down.gif Thank you brian-263 wrote: On Sat, Jan 3, 2009 at 8:57 PM, MarkAtHarvest m...@harvestinfotech.com wrote: Brian, I am a newbie on CSS , let me try to change it and update you back on how it goes, thanks it seems this should work. BTW, changing to /images/down.gif, does not work at all, my images folder is at the root itself. Under the webapps folder of my java application. Even if I try to create a href link to /images/down.gif, it goes directly to http://images/down.gifinstead of going to http://localhost:8080/images/down.gif. Then you've likely got something wrong with your application. Though it's obviously not a jQuery problem, how are you creating these img tags? -- View this message in context:http://www.nabble.com/Absolute-Image-location-tp21258855s27240p212724... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: row highlite in jquery
Hi Vicky, You could try this: $('tr:has(td)') ... --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jan 5, 2009, at 7:17 AM, Vicky am wrote: Hello Billy, Thanks for the replying. I cannot change html whcih is to be th inside tr. I cannot use thead as i get html from server control and it prodoces th inside tr :( On Mon, Jan 5, 2009 at 5:17 PM, Billy billy.m...@gmail.com wrote: You could try coding your table more specifically like this: table thead tr thmy header content/th /tr /thead tbody tr tdmy body content/td /tr /tbody /table Then in your jQuery code do: $(table tbody tr) Hope that helps :) On Jan 5, 9:18 am, vivekamar...@gmail.com wrote: Hello, I have following poblem to highlight row, i use followin jquery $(document).ready(function() { $(table tr).css ({ background:#ee }).hover( function() { $(this).css({ background: #DE2211 }); }, function() { $(this).css({ background: #ee }); } ); }); problem is it highlight every row even header on hovering..is there way to not highlight th only,,can i add condition that if table tr is th then background is #ee..i want to do without class pls perdon my english.
[jQuery] Re: Check both fields together with ajax
Try $(#myfield).valid() - http://docs.jquery.com/Plugins/Validation/valid To clear the cache: $(#myfield).data(previousValue, null); Jörn On Sun, Jan 4, 2009 at 8:07 PM, neo tkolodziej...@gmail.com wrote: Ok, so at least is there a possibility to run checking validation for one specified field? Something like $('my_field').validate()? But without cache for ajax. On Jan 3, 1:53 pm, neo tkolodziej...@gmail.com wrote: Hi, I'm playing with validation and I encountered a problem. I have a text input and a select button. I want to check whether they aren't empty and check via ajax if it's valid (user's typing alias and domain) I was trying to disable validation for text input and just set it an event which fires validation connected with the second field, but it seems that there's problem with cache linked with ajax. My code: domain:{ required: true, alias: true, remote: { url: 'check.php', type: 'get', data: { alias: function() { return $('#alias').val(); } } } } jQuery.validator.addMethod(alias, function(value, element) { return $('#alias').val().length 0 }, Please enter alias);
[jQuery] Re: row highlite in jquery
Hello Billy, Thanks for the replying. I cannot change html whcih is to be th inside tr. I cannot use thead as i get html from server control and it prodoces th inside tr :( On Mon, Jan 5, 2009 at 5:17 PM, Billy billy.m...@gmail.com wrote: You could try coding your table more specifically like this: table thead tr thmy header content/th /tr /thead tbody tr tdmy body content/td /tr /tbody /table Then in your jQuery code do: $(table tbody tr) Hope that helps :) On Jan 5, 9:18 am, vivekamar...@gmail.com wrote: Hello, I have following poblem to highlight row, i use followin jquery $(document).ready(function() { $(table tr).css ({ background:#ee }).hover( function() { $(this).css({ background: #DE2211 }); }, function() { $(this).css({ background: #ee }); } ); }); problem is it highlight every row even header on hovering..is there way to not highlight th only,,can i add condition that if table tr is th then background is #ee..i want to do without class pls perdon my english.
[jQuery] Re: is accessing element by a class faster than accessing X element by ID
And another way: $(div[id^='toto']).hide(); although i couldn't see one or the other or even the other being much faster considering that the selector would have to go through all the elements to see if *any* element on the page either (1) has the specified class or (2) has the specified id but i'm no DOM expert, just seems to make sense :-/ On Jan 5, 10:50 am, Christof Donat cdo...@gmx.de wrote: Hi, And try something like: var toto = []; $('.toto').each(function(){ var elem = $(this); toto[elem.attr('ref')] = elem; } Then, to hide the toto div with ref=1 or ref=2, just call: toto[1].hide(); toto[2].hide(); Why not use this: var toto = $('.toto'); toto[1].hide(); toto[2].hide(); That should be the same. Appart from that I think, that Jean Babtiste wanted to hide all elements at the same time. I'd expect his first ( $('.toto').hide() ) version to be usually faster, but I'm not shure about that. Christof
[jQuery] Re: $(document).keydown only works in FireFox?
The enter key is only registered on a keypress event in IE and Webkit--so use keypress instead. -Dan On Mon, Jan 5, 2009 at 6:20 AM, s0h0 simon.rueckert@siemens.com wrote: Hello, i tried to use jQuery for cross browser compatibility...I want to execute a click on a Button when Enter got pressed on page... but the following script still only works in FireFox and not in IE. can anyone help me or have an idea? script type=text/javascript src=jquery.js/script script type=text/javascript $(document).ready(function() { $(document).keydown(function(evt) { if (!evt) evt = window.event; if (evt.keyCode == 13) { // alert(enter captured from IE); $(btnCanelEditUser).click(); } else if (evt.which == 13) { //alert(enter captured from Gecko, Opera); $(btnCanelEditUser).click(); } }); }); /script -- View this message in context: http://www.nabble.com/%24%28document%29.keydown-only-works-in-FireFox--tp21289326s27240p21289326.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Combo box problem
ya i know mike ... but i have to hide another list when you select next like if you select hi it has to display list related to hi and when we select Hello it has to display list related to Hello and hide list related to hi ... but it not doing... if i put hide code in if() then it simply shows me both list without selecting any option... got my problem?? $(document).ready(function() { $('#list,#list1').hide(); $('select.alert').change(function() { $('#list,#list1').hide(); var x=($(this).val()); var id = x == 'hi' ? '#list' : '#list1'; $(id).show(slow); }); });
[jQuery] Re: jQuery Cycle - onBefore not running on first slide?
I'm using the onBefore() function to check for the tagName of the next element/slide. (If it's a jpg, png, flv, etc.) But it looks like the onBefore() function is not run on the first slide, because the function does not start on the first slide, but it does start properly when the slideshow has looped through and is back on the first slide. The 'before' callback fires before every transition, even the first one. Can you post a link to the page you're working on?
[jQuery] jQuery.Accordion - how can panels stay open?
I'm successfully using the accordion here http://www.norwegianfashion.no (right side below videos). My question is: How can I leave a panel open after it's been clicked? If 'Andre lenker' is open and I click 'Designskoler', 'Andre lenker' panel is closed and 'Designskoler' opens. Offcourse I would like to close an open panel by clicking it again. I'm not sure if this is similar to what I need: http://groups.google.com/group/jquery-en/browse_thread/thread/51a8b8a5d7feb738/640f730a404df9f4?lnk=gstq=accordion#640f730a404df9f4 I tested it, but that broke the accordion functionality.
[jQuery] Re: Dynamic form validation on different names possible?
Thanks for your help Jörn. I finally figured out what my problem was. The page doesn't load all the input elements in the form until the user manually selects a year. In other words the rules get empty values because there are no matching rules at the point where $ (function()...) is call. Now I just need to find a way to create the rules before submitting! Thanks, Diego. On Dec 23, 1:01 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Replace this: $(.tableform).validate({debug: true, options: rules}); with this: $(.tableform).validate({debug: true, rules: rules}); Jörn On Fri, Dec 19, 2008 at 4:00 PM, dfiguero dfigu...@gmail.com wrote: So far I got: $(function(){ $.validator.addMethod(compare, function(value, element, param){ Date.format = 'mmm. dd, '; sdate = Date.fromString($(param[0]).val()); edate = Date.fromString($(param[1]).val()); return (sdate.getTime() = edate.getTime()) || this.optional (element); }, End date must be later than the Start date) var rules = {}; $(.repeatingformfield).each(function(){ $(this).find(:text).each(function(n){ if (n == 0) rule_name = this.name; if (n == 1) start_date = this.id; if (n == 2) end_date = this.id; }); rules[rule_name] = { compare: [# + start_date, # + end_date] } }); $(.tableform).validate({debug: true, options: rules}); }); But I guess my logic is not that great since the compare method doesn't seem to be called. Perhaps the method definition does not match the way I'm calling it but I'm not able to see that on firebug. Any suggestions? Diego. On Dec 18, 4:10 pm, dfiguero dfigu...@gmail.com wrote: Thanks Jörn I'll give it a try! On Dec 18, 12:17 pm, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: You could generate the rules object. var rules = {}; $(:input[name*=date-start]).each(function() { rules[this.name] = { ... }}); $(...).validate({options:rules}); Jörn On Thu, Dec 18, 2008 at 3:01 PM,dfiguerodfigu...@gmail.com wrote: Hi, I'm trying to validate a form with a dynamic date fields. Something like: tr id=period1 class=someclass td input type=text name=date-1-start id=date_1-start value=Mar. 29, 2008 / input type=text name=date-1-end id=date_1-end value=Mar. 29, 2008 / /td /tr tr id=period2 class=someclass td input type=text name=date-2-start id=date_2-start value=Jun. 02, 2010 / input type=text name=date-2-end id=date_2-end value=Jun. 02, 2010 / /td /tr ... tr id=period3 class=someclass td input type=text name=date-n-start id=date_n-start value=aaa. 99, / input type=text name=date-n-end id=date_n-end value=aaa. 99, / /td /tr I got my validation rules working but only if I hardcode each of the input's names: $(form).validate({ rules: { date-1-start: compare [#date_1-start,#date_1-end], date-2-start: compare [#date_2-start,#date_2-end], ... date-n-start: compare [#date_n-start,#date_n-end] } }); Would there be a way to dynamically generate the rules? Something like: $(form).validate({ rules: { $(:input[name*=date-start]): compare [$(:input[name*=date- start]),$(:input[name*=date-end])], } }); I know I could perhaps do this by adding classes to the input fields but I would prefer avoiding that option. Thanks
[jQuery] is accessing element by a class faster than accessing X element by ID
Hi, I want to know if it first code is faster than the second (and why) : 1st try : div id=toto1 class=toto/div... div id=toto2 class=toto/div... div id=toto3 class=toto/div... $(.toto).hide(); 2nd try : div id=toto1/div... div id=toto2/div... div id=toto3/div... $(#toto1).hide(); $(#toto2).hide(); $(#toto3).hide(); (in my code, there are more than 50 toto) Thanks for helping.
[jQuery] Filter and fade problems
Hi, to all I have never worked with javascripts, but I have to do something in my web,that needs a javascript. The problem is that I want to present my architectural projects by category. I have about 6 menus(each menu represents a category) and a big layer below it. Automatically all thumbs (in divs) are in that layer and all are visible as a grid. And when I click a Menu-a all other thumbs except that thumbs belong Menu-a have to fade(disappear/ hide). And when I want click it again all thumbs must appear again, and apply this function to all categories. I found some codes for make it fade and toggle but toggling only makes it appear or fade: SCRIPT language=javascript jQuery.hiddenTags = false; settag = function(cname) { var space = cname.indexOf(' '); return cname.substring(4, space); } $('a.tag').toggle( function() { tag = settag($(this).attr('class')); divtag = 'div.tag_'+tag; atag = 'a.tag_'+tag; if(!jQuery.hiddenTags) { $('div.tag').fadeOut('slow'); jQuery.hiddenTags = true; } $(divtag).slideDown('slow'); $(atag).toggleClass(menuselected'); }, function() { tag = settag($(this).attr('class')); divtag = 'div.tag_'+tag; atag = 'a.tag_'+tag; $(divtag).slideUp('slow'); $(atag).toggleClass('menuselected'); } ) /SCRIPT Please, can anyone help me.I am investigating about some scripts and effects about 2 months. I am architect student and wanted to do my own webpage.
[jQuery] Re: How to bind ajaxForm Vaildate via livequery on Form which was loaded via load() ??
I'd need to see a complete testpage for further debugging. Jörn On Mon, Jan 5, 2009 at 3:43 PM, dedian phil...@workx.at wrote: Hi THX for ur fast reply. Tried to use the debug, like that: $(#detailform).livequery(function() { $(#detailform).validate({ debug: true, submitHandler: function(form) { jQuery(form).ajaxSubmit({ url: 'index.php?idcatside=33', target: '#contactformfield', method: 'GET' }); return false; } }); }); It's still the same, the page just reloads. Maybe the whole design is wrong??? What else can I try? Cheers Jörn Zaefferer-2 wrote: Try to set debug:true to prevent the default submit, that way you should be able to see any errors thrown. $(#form).validate({ debug: true, ... }); Jörn On Mon, Jan 5, 2009 at 3:22 PM, dedian phil...@workx.at wrote: Hi! THX for the Tipp! I changed my code and ended up with the following: $('#detailform').livequery(function() { $(#detailcalc form).validate({ submitHandler: function(form) { jQuery(form).ajaxSubmit({ url: 'index.php?idcatside=33', target: '#contactformfield', method: 'GET' }); return false; } }); }); Whats happing now it that the page is reloading instead of fireing an ajaxSubmit(). What can cause that? THX dedian wrote: Hi I'm loading a form via load() and want to Validate it via Validate Plugin and send it via ajaxForm() My Code looks like that: $('#detailform').livequery(function() { $(#detailform).validate(); var options = { url: 'index.php?idcatside=33', target: '#contactformfield', method: 'GET', success:function() { } }; $('#detailform').ajaxForm(options); return false; }); My problem is now that everything is working but the form is sent immediatly, the script doesn't wait for the validation. How can I change that? THX cheers Philipp -- View this message in context: http://www.nabble.com/How-to-bind-ajaxForm---Vaildate-via-livequery-on-Form-which-was--loaded-via-load%28%29tp21288622s27240p21291853.html Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/How-to-bind-ajaxForm---Vaildate-via-livequery-on-Form-which-was--loaded-via-load%28%29tp21288622s27240p21292199.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] [support] imap jquery
Hi Every one, Am working in imap(gmail) presently am loading the inbox mails using imap php, i want to increase the speed(Loading inbox mails) Is there any possibility to use the jquery ,For increase the speed , Thanks -- உங்கள் நண்பன் பரணி குமார் Regards B.S.Bharanikumar POST YOUR OPINION http://bharanikumariyer.hyperphp.com/ http://bharanikumariyerphp.site88.net/
[jQuery] Horizontal scrolling does not render correctly in IE or Safari
I implemented a jquery effect to a design project at work. All looks great in Mozilla, but it renders horribly in IE. Does any of the jQuery guru know how this problem can be solved? Here's the link - http://www.carlsonschool.umn.edu/Page9350.aspx Please view in IE. Thanks! djai
[jQuery] Re: is accessing element by a class faster than accessing X element by ID
I think comparing two strings would be faster than deciding whether a string begins with another string. Also, doing one selection would almost always be faster than doing 3, so I'd say that the first piece of code from the OP would be faster. It should only require one loop through the DOM tree. I think the solution that used the each would be a little bit slower because there would be some overhead from using the each function, rather than simply traversing the jQuery array with .hide(). Now, I say all this from the perspective of a Computer Science major. I've not looked at the jQuery source code for this, so I could be wrong about the way it does this. Of course for a small number of elements (and yes, 50 is still small), it shouldn't make a bit difference (though another consideration is the size of the JS, in which case the first piece of code from the OP is definitely better). On Jan 5, 10:53 am, MorningZ morni...@gmail.com wrote: And another way: $(div[id^='toto']).hide(); although i couldn't see one or the other or even the other being much faster considering that the selector would have to go through all the elements to see if *any* element on the page either (1) has the specified class or (2) has the specified id but i'm no DOM expert, just seems to make sense :-/ On Jan 5, 10:50 am, Christof Donat cdo...@gmx.de wrote: Hi, And try something like: var toto = []; $('.toto').each(function(){ var elem = $(this); toto[elem.attr('ref')] = elem; } Then, to hide the toto div with ref=1 or ref=2, just call: toto[1].hide(); toto[2].hide(); Why not use this: var toto = $('.toto'); toto[1].hide(); toto[2].hide(); That should be the same. Appart from that I think, that Jean Babtiste wanted to hide all elements at the same time. I'd expect his first ( $('.toto').hide() ) version to be usually faster, but I'm not shure about that. Christof
[jQuery] Horizontal scrolling does not render correctly in IE or Safari
I implemented a jquery effect to a design project at work. All looks great in Mozilla, but it renders horribly in IE and Safari. Does any of the jQuery guru know how this problem can be solved? Here's the link - http://www.carlsonschool.umn.edu/Page9350.aspx Please view in IE or Safari. Thanks! djai
[jQuery] [validate] Attaching events to dynamically added fields
Hi Jörn or anyone else familiar with this plugin, First off, thanks for the great validation plugin. I hope I do not impose too much with this question. I have a dynamic form with fields named using brackets ([]). Validation is working for fields that existed on the initial page load, but when I add append the code for a new field, the validation events are, of course, not attached to the new DOM elements. What's the best way to accomplish this? Rob
[jQuery] Newbie question
hi all, is jquery have function like findXY(element) or scroll position? sorry not finish read all document about jquery ~ saiful haqqi ~
[jQuery] [validate] Attaching events to dynamically added fields
Hi Jörn or anyone else familiar with this plugin, First off, thanks for the great validation plugin. I hope I do not impose too much with this question. I have a dynamic form with fields named using brackets ([]). Validation is working for fields that existed on the initial page load, but when I add append the code for a new field, the validation events are, of course, not attached to the new DOM elements. What's the best way to accomplish this? Rob
[jQuery] Use mouseover when use a Draggable()
Hi, I want use a mouseover and mouseout event when I Drag some object, but when I use drag in some object the mouse events in other object dont start. Exemple I have a table and its cells have a mouseover and mouseout to change your background. When I move the mouse curso on the cell mouseover and mouseout start, but if I drag some object this events cant start. Tks I use this JS $('#drag1').Draggable({snapDistance: 10}); $(#td01).mouseover(function(){ this.style.backgroundColor = '#cc'; }); $(#td01).mouseout(function(){ this.style.backgroundColor = '#ff'; }); and this HTML div id=drag1 class=draggable a href=index.phpDrag me/a /divbrbr table border=1 width=50% tr td id=td01nbsp;/td tdnbsp;/td tdnbsp;/td /tr /table
[jQuery] dialog drag problem with iframe
hi, I´m trying to use an iframe inside a dialog div, and the behavior of the dragging is making me, and the end user crazy =). When we drag in a vertical direction everything works fine, but if the drag is vertical, for any reason the dragging stops and the cursor moves free inside the dialog, note that this behavior does not happen when we have a dialog based on a div only. any tips, ideas, suggestions, directions ? here is parte of the source html head link rel=stylesheet href=dialog.css type=text/css media=screen title=(Default) script src=jquery-1.2.6.min.js/script script src=jquery-ui-personalized-1.6b.packed.js/script script $(document).ready(function(){ $(#div2).dialog({ modal: false, title: div me, width: 790, height: 440, buttons: { Close me: function() { $(this).dialog(close); } } }).show(); $(#div1).dialog({ modal: false, title: iframe me, width: 790, height: 440, buttons: { Close me: function() { $(this).dialog(close); } } }).show(); $(#createPageiFrame).attr(src,data.html); $(#div2).load(data.html); }); /script /head body div id=div2/ div id=div1 iframe id=createPageiFrame width=100% height=100% scrolling=no frameborder=0 / /div /body /html I made a mock sample of the problem that can be reached at the following url http://www.athanazio.com/wp-content/uploads/2009/01/dialog-with-iframe.zip thanks Hamilton
[jQuery] [autocomplete] Anyway to highlight words accents-insensitive?
Autocomplete plugin: http://docs.jquery.com/Plugins/Autocomplete As in the subject, I want to be able to highlight the words accents- insensitivily. Example: if I type Jose, José would be highlighted and vice-versa (José would highlight Jose). Is there anyway to do it? I'm willing to make changes in the source code, if it's necessary.
[jQuery] SVN for SuperFish?
I have started using SuperFish for a new project and I'd like to create an external SVN reference to SuperFish for the project but I couldn't find a repository. Is there one? Thanks, Mike
[jQuery] How can I replace some text to another fragment? Wrappers don't support it
Hello. How can I replace some text to another fragment? For example, if I want to highlight all words ‘the’ with red color, I guess to do something like that $('body').ReplaceTo(‘%the%’, ‘span style=”background-color: red;”the/span’); I can’t do this with standard wrappers built-in on jQuery…
[jQuery] Re: How to check all required fields after each field is filled...
An easier way to set an onsubmit event handler on the submit button. Onsubmit, you check all the forms. If it doesn't validate, modify the DOM to show it to the user. Then _return false_. That should stop the submit action. On Jan 4, 2:36 pm, Rick Faircloth r...@whitestonemedia.com wrote: Thanks, Joe! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Joe Sent: Sunday, January 04, 2009 1:30 PM To: jQuery (English) Subject: [jQuery] Re: How to check all required fields after each field is filled... This works, but is not terribly usable as it throws an alert every after every failed scan, but you can easily modify the method to make it more usable, or even simply remove the alert and the button will remain disabled until all required fields are filled in. It could be optimized a bit, but for clarity it's a bit verbose. Copy and paste this into a new .html file and load in your browser. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en-us lang=en dir=ltr head script type=text/javascript src=http://ajax.googleapis.com/ ajax/libs/jquery/1.2.6/jquery.js /script script type=text/javascript $(function(){ // Cached the wrapped set. $req = $('input.required'); // A flag for scan results. $.reqFlag = { pass: null, failMethod: function(){ alert('Please Fill In All Required Fields'); }, passMethod: function(){ $('#submitButton').attr('disabled',false); } } // Scan method. $.scan = function(){ $req.each(function(){ !$(this).val() ? $.reqFlag.pass = false : $.reqFlag.pass = true; }) !$.reqFlag.pass ? $.reqFlag.failMethod() : $.reqFlag.passMethod(); } $req.each(function(){ $(this).blur(function(){ $.scan() }); }); }); /script /head body form action= input class='required' name=one type=text / br / input class='required' name=two type=text / br / input class='required' name=three type=text / br / input class='required' name=four type=text / br / input type='submit' value='go' id=submitButton disabled=true / /form /body /html On Jan 3, 9:58 pm, Rick Faircloth r...@whitestonemedia.com wrote: Thanks for the reply, Joe... To answer your question: I want to check the required fields for any that are still invalid after a user blurs out of any required field. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Joe Sent: Saturday, January 03, 2009 10:15 PM To: jQuery (English) Subject: [jQuery] Re: How to check all required fields after each field is filled... However, I want to be able to scan all required fields after each field is filled in and see if any required fields remain to be satisfactorily completed. When do you want to scan? After the user blurs out of the last input? Or blurs out of any required input (because technically the user could skip around on the form)? You obviously can't do it on submit because the button is disabled. I have an idea of how to do it, but you need to dictate the event handler that is going to do trigger the scanning. Joe http://www.subprint.com On Jan 3, 6:17 pm, Rick Faircloth r...@whitestonemedia.com wrote: Anyone? I'm trying to validate a form. All the validation I've implemented up to this point is working fine. However, I want to be able to scan all required fields after each field is filled in and see if any required fields remain to be satisfactorily completed. If there are any, I want to keep the submit button on my form disabled. I'm trying to use this code: $(':input.required').each(function() { var val = (this.value.length); if (val == 0) { $('#submit').attr('disabled', 'disabled'); }; }); However, each time I fill in a required field, the submit button is enabled. (I realize for now that the code above is only checking length and I can add other checks later, but wanted to get this one working
[jQuery] drawing hierarchy schemes
Hi! How can I draw hierarchy schemes with jQuery? Have it got plugin for such stuff? I want to draw something like this: parent1 parent2 | | --- -- | | || child1-1 child1-2 child2-1 child2-2 etc. what do you think? =) thx!
[jQuery] Re: Newbie question
See http://docs.jquery.com/CSS Specifically http://docs.jquery.com/CSS/offset http://docs.jquery.com/CSS/position http://docs.jquery.com/CSS/scrollTop http://docs.jquery.com/CSS/scrollLeft - Richard On Mon, Jan 5, 2009 at 2:11 PM, saiful.ha...@gmail.com saiful.ha...@gmail.com wrote: hi all, is jquery have function like findXY(element) or scroll position? sorry not finish read all document about jquery ~ saiful haqqi ~
[jQuery] Re: Absolute Image location
I use a Mac Mini as my development server. It runs Apache and my other servers needed to develop sites locally. When I set up a new site I do the following: 1) Create a new virtual host for that site, with the URL of local.mydomain.com 2) On my workstation (PC) I create a host file entry pointing to my development server: local.mydomain.com192.138.0.5 What this allows me to do is to use absolute pathing: /images/someimage.gif And have it be pointing to the correct location. Just throwing it out. The same thing can obviously be accomplished if you're running Apache on your local machine. Andy matthews -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of MarkAtHarvest Sent: Monday, January 05, 2009 8:53 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Absolute Image location awesome, /mytrail/images/down.gif works, only problem now I need to solve is if I flatten this war file and install it on the domain itself(i.e at http://localhost instead of http://localhost/mytrial) , then I need to change the javascript to /images/down.gif Thank you Richard, Brian, for solving my problem. richard.aday wrote: From what you wrote the way the link is being handled looks correct. Why don't you try: /mytrail/images/down.gif . On Jan 3, 6:54 pm, MarkAtHarvest m...@harvestinfotech.com wrote: Brian, Here is the html code on myhttp://localhost:8080/mytrial/admin.gsp, on my grails application. Just added this to find the absolute location for the images if I use div class=images images/down.gif image /div this goes to link,http://localhost:8080/mytrial/images/down.gif, and it does not find it. and if I change this to div class=images /images/down.gif image /div this goes to linkhttp://localhost:8080/images/down.gif, its going to root intead of going tohttp://localhost:8080/mytrial/images/down.gif Thank you brian-263 wrote: On Sat, Jan 3, 2009 at 8:57 PM, MarkAtHarvest m...@harvestinfotech.com wrote: Brian, I am a newbie on CSS , let me try to change it and update you back on how it goes, thanks it seems this should work. BTW, changing to /images/down.gif, does not work at all, my images folder is at the root itself. Under the webapps folder of my java application. Even if I try to create a href link to /images/down.gif, it goes directly to http://images/down.gifinstead of going to http://localhost:8080/images/down.gif. Then you've likely got something wrong with your application. Though it's obviously not a jQuery problem, how are you creating these img tags? -- View this message in context:http://www.nabble.com/Absolute-Image-location-tp21258855s27240p21272 4... Sent from the jQuery General Discussion mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Absolute-Image-location-tp21258855s27240p21292345.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: jQuery Cycle - onBefore not running on first slide?
Apparently, yes. I tried to put a setTimeout around the if-part, and it seems to work. setTimeout(function() { if(player (tag == 'object' || tag == 'embed')) { player.sendEvent('PLAY', true); } }, 1500); -- View this message in context: http://www.nabble.com/jQuery-Cycle---onBefore-not-running-on-first-slide--tp21287122s27240p21290893.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Best way to Toggle
Hi everybody and sorry about my English! This is my markup: fieldset id=id_1 dl class=campo-esteso dtnbsp;/dt dd input name=flag type=checkbox class=flag id=flag value=on tabindex=1 / span class=opzionaleToggle?!?!/span /dd /dl /fieldset fieldset id=id_2 // this fieldset is hidden Some input text type /fieldset I have 3 similar checkbox field next. What about the best way to toggle the next fieldset element. I'd try this, but it doesn't works: $(':checkbox').click(function(){ $(this).parent('fieldset').slideToggle(); }); Thank you all.
[jQuery] Re: dialog drag problem with iframe
On Mon, Jan 5, 2009 at 12:03 PM, Hamilton Lima (athanazio) hamilton.l...@gmail.com wrote: hi, I´m trying to use an iframe inside a dialog div, and the behavior of the dragging is making me, and the end user crazy =). When we drag in a vertical direction everything works fine, but if the drag is vertical, for any reason the dragging stops and the cursor moves free inside the dialog, note that this behavior does not happen when we have a dialog based on a div only. any tips, ideas, suggestions, directions ? When you are resizing and your mouse cursor goes over the iframe, the iframe is stealing those mousemove events/capturing the mouse. Would you enter a bug ticket here http://ui.jquery.com/bugs/newticket (note: requires registration) You've already got a nice test case. Feel free to attach that to the ticket. Also note, there is a dedicated discussion list for jQuery UI plugins[*]: http://groups.google.com/group/jquery-ui should you have any futher questions. Thanks. - Richard [*] http://rdworth.org/blog/2008/10/jquery-plugins-and-jquery-ui/
[jQuery] Re: [validate] Attaching events to dynamically added fields
On Mon, Jan 5, 2009 at 2:40 PM, Rob robstefanus...@gmail.com wrote: Hi Jörn or anyone else familiar with this plugin, First off, thanks for the great validation plugin. I hope I do not impose too much with this question. I have a dynamic form with fields named using brackets ([]). See this note: http://docs.jquery.com/Plugins/Validation/Reference#Fields_with_complex_names_.28brackets.2C_dots.29 Validation is working for fields that existed on the initial page load, but when I add append the code for a new field, the validation events are, of course, not attached to the new DOM elements. What's the best way to accomplish this? Make sure you understand event delegation. There's some info in the docs. Basically, you need to ensure that any newly-created elements are bound to event handlers. You can either bind them when they are added or bind the container and findthe specific element in your event handler by getting event.target. Though, I've no idea how to do this with the Validation plugin, specifically.
[jQuery] Re: jQuery Cycle - onBefore not running on first slide?
http://www.3ddesign.no/tjenester/film.aspx Here is the onBefore function: function onBefore(curr, next, opts) { var tag = next.tagName.toLowerCase(); if(player (tag == 'object' || tag == 'embed')) { player.sendEvent('PLAY', true); } else if(player) { player.sendEvent('STOP'); } } malsup wrote: The 'before' callback fires before every transition, even the first one. Can you post a link to the page you're working on? -- View this message in context: http://www.nabble.com/jQuery-Cycle---onBefore-not-running-on-first-slide--tp21287122s27240p21290723.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: is accessing element by a class faster than accessing X element by ID
Honestly, it's going to be faster to create a master list of toto elements, and just traverse that list. Implementation of this is pretty straightforward. If you alter the HTML to resemble something like this: div ref=1 class=toto/div div ref=2 class=toto/div div ref=3 class=toto/div And try something like: var toto = []; $('.toto').each(function(){ var elem = $(this); toto[elem.attr('ref')] = elem; } Then, to hide the toto div with ref=1 or ref=2, just call: toto[1].hide(); toto[2].hide(); On Jan 5, 9:29 am, jean-baptiste.demo...@digitick.com jbdemo...@gmail.com wrote: Hi, I want to know if it first code is faster than the second (and why) : 1st try : div id=toto1 class=toto/div... div id=toto2 class=toto/div... div id=toto3 class=toto/div... $(.toto).hide(); 2nd try : div id=toto1/div... div id=toto2/div... div id=toto3/div... $(#toto1).hide(); $(#toto2).hide(); $(#toto3).hide(); (in my code, there are more than 50 toto) Thanks for helping.
[jQuery] Re: Check both fields together with ajax
Ok, cache cleared :-) But is there, it's not necessary for me since I can do it (as I wrote) using custom method attached to the second field which uses ajax and custom method connected with the first one which clears cache and fires validation of the second. But is there an automatic way of doing this using validate? I don't know, something like: { together:{ first:{ required: true, remote: ..., whatever_else: true }, second:{ something: true }, displayErrors: somewhere } Something like this which fires validation of all elements while for example changing the first one. Here errors, I think, should be put in a special box. Thanks a lot Jörn !
[jQuery] $.ajax and xml
I built a simple photo gallery with XML and Jquery. Works Perfect in Firefox, and displays nothing in IE6/7. I have examined the produced code with FireBug, and it looks exactly as it should. From the research I have found, it's either an issue with XML being called as ActiveX (which may not be a Jquery bug, just an issue with IE) or something with .html... I don't think that is the answer. Pretty sure I have activex turned on and all. http://dev.jquery.com/ticket/3777 - Source files are located here. Thanks in advance for any assistance.
[jQuery] Re: $.click stops working after 2 clicks
doesn't make any sense, there must be something else interfering with your code. BTW, you can make that way more readable: $(.showEvents).click(function(e) { var Calendar = $(this).parent().parent(), ID = Calendar.attr('id').substr(4), data = $('#data_+ID); if (data.length) { $(this).attr(src,images/down.png); data.hide(); } else { $('tr/').attr(id,data_+ID) .append('td colspan=4Test/td') .children('td').css({ backgroundColor: Calendar.css('backgroundColor'), height: '300px' }).end().insertAfter(Calendar); $this.attr(src,images/up.png); }; }); On Jan 5, 2:32 pm, revivedk timsoren...@gmail.com wrote: Hi. I'm having a problem, where $(.showEvents).click(function(e) { var CalendarID = $($(e.target).parent()).parent(); if ( $('#data_'+CalendarID.attr('id').substr(4)).length 0 ) { $(e.target).attr({src : images/down.png}); $('#data_'+CalendarID.attr('id').substr(4)).hide(); } else { CalendarID.after('tr id=data_'+CalendarID.attr('id').substr (4)+'td colspan=4 style=background-color:'+CalendarID.css ('background-color')+';height:300px;Test/td/tr'); $(e.target).attr({src : images/up.png}); } }); will stop working after I have clicked the #showEvents 2 times. img border=0 class=showEvents src=images/down.png/
[jQuery] Re: is accessing element by a class faster than accessing X element by ID
I think Eric Hobo's piece is probably faster for any collection regardless of size, since it's essentialy just document.getElementById ('toto').childNodes On Jan 5, 2:02 pm, Will Anderson javayaht...@gmail.com wrote: I think comparing two strings would be faster than deciding whether a string begins with another string. Also, doing one selection would almost always be faster than doing 3, so I'd say that the first piece of code from the OP would be faster. It should only require one loop through the DOM tree. I think the solution that used the each would be a little bit slower because there would be some overhead from using the each function, rather than simply traversing the jQuery array with .hide(). Now, I say all this from the perspective of a Computer Science major. I've not looked at the jQuery source code for this, so I could be wrong about the way it does this. Of course for a small number of elements (and yes, 50 is still small), it shouldn't make a bit difference (though another consideration is the size of the JS, in which case the first piece of code from the OP is definitely better). On Jan 5, 10:53 am, MorningZ morni...@gmail.com wrote: And another way: $(div[id^='toto']).hide(); although i couldn't see one or the other or even the other being much faster considering that the selector would have to go through all the elements to see if *any* element on the page either (1) has the specified class or (2) has the specified id but i'm no DOM expert, just seems to make sense :-/ On Jan 5, 10:50 am, Christof Donat cdo...@gmx.de wrote: Hi, And try something like: var toto = []; $('.toto').each(function(){ var elem = $(this); toto[elem.attr('ref')] = elem; } Then, to hide the toto div with ref=1 or ref=2, just call: toto[1].hide(); toto[2].hide(); Why not use this: var toto = $('.toto'); toto[1].hide(); toto[2].hide(); That should be the same. Appart from that I think, that Jean Babtiste wanted to hide all elements at the same time. I'd expect his first ( $('.toto').hide() ) version to be usually faster, but I'm not shure about that. Christof
[jQuery] Re: How to check all required fields after each field is filled...
Hi, Richard... The only drawback to that approach is that it does require submission of the form to get feedback to the user. On this particular form, which is quite lengthy, I've set it up to provide feedback onblur or onchange while the form is being completed. I typically avoid using onsubmit client-side validation, since I don't see any difference between that and the server-side validation that I always run, as well. I did work out a solution which seems to be working well. Thanks for the feedback and idea! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of richard.aday Sent: Monday, January 05, 2009 6:47 AM To: jQuery (English) Subject: [jQuery] Re: How to check all required fields after each field is filled... An easier way to set an onsubmit event handler on the submit button. Onsubmit, you check all the forms. If it doesn't validate, modify the DOM to show it to the user. Then _return false_. That should stop the submit action. On Jan 4, 2:36 pm, Rick Faircloth r...@whitestonemedia.com wrote: Thanks, Joe! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Joe Sent: Sunday, January 04, 2009 1:30 PM To: jQuery (English) Subject: [jQuery] Re: How to check all required fields after each field is filled... This works, but is not terribly usable as it throws an alert every after every failed scan, but you can easily modify the method to make it more usable, or even simply remove the alert and the button will remain disabled until all required fields are filled in. It could be optimized a bit, but for clarity it's a bit verbose. Copy and paste this into a new .html file and load in your browser. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en-us lang=en dir=ltr head script type=text/javascript src=http://ajax.googleapis.com/ ajax/libs/jquery/1.2.6/jquery.js /script script type=text/javascript $(function(){ // Cached the wrapped set. $req = $('input.required'); // A flag for scan results. $.reqFlag = { pass: null, failMethod: function(){ alert('Please Fill In All Required Fields'); }, passMethod: function(){ $('#submitButton').attr('disabled',false); } } // Scan method. $.scan = function(){ $req.each(function(){ !$(this).val() ? $.reqFlag.pass = false : $.reqFlag.pass = true; }) !$.reqFlag.pass ? $.reqFlag.failMethod() : $.reqFlag.passMethod(); } $req.each(function(){ $(this).blur(function(){ $.scan() }); }); }); /script /head body form action= input class='required' name=one type=text / br / input class='required' name=two type=text / br / input class='required' name=three type=text / br / input class='required' name=four type=text / br / input type='submit' value='go' id=submitButton disabled=true / /form /body /html On Jan 3, 9:58 pm, Rick Faircloth r...@whitestonemedia.com wrote: Thanks for the reply, Joe... To answer your question: I want to check the required fields for any that are still invalid after a user blurs out of any required field. Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Joe Sent: Saturday, January 03, 2009 10:15 PM To: jQuery (English) Subject: [jQuery] Re: How to check all required fields after each field is filled... However, I want to be able to scan all required fields after each field is filled in and see if any required fields remain to be satisfactorily completed. When do you want to scan? After the user blurs out of the last input? Or blurs out of any required input (because technically the user could skip around on the form)? You obviously can't do it on submit because the button is disabled. I have an idea of how to do it, but you need to dictate the event handler that is going to do trigger the scanning. Joe