[jQuery] Re: Little help please?
Michael, Thanks very much for your reply. It has cleared many things up for me and can see now why I was having trouble. I will take your advice and make an object rather than a jquery plugin. Thanks very much. Kris.
[jQuery] Hover vs Click, etc.
The following script produces a box that opens on mouseover and closes on mouseover. $(\'#triggerReg\').hover(function(){ // do something on mouse over $(\'#menuReg\').show(); },function(){ // do something on mouse out $(\'#menuReg\').hide(); }); It works fine for displaying brief text messages. But if you display a column of links, it closes as soon as you try to put the cursor over a link. Can someone show me how to modify this so that the menu stays open until you manually close it again? I changed hover(function() to click (function(), and it now opens when you click it - and it stays open. But I can't figure out how to close it. I've been searching for online references that list the various options, but I haven't found one I can understand yet. Thanks.
[jQuery] Re: wiki software used for docs.jquery.com?
Yes, it's mediawiki. - Richard On Sun, Feb 15, 2009 at 10:27 PM, mumbojumbo madmediabl...@gmail.comwrote: I love the docs and I was wondering what wiki platform they were using. Any Idea? I think its a modified version of mediawiki but I thought I would ask. Thanks, MJ
[jQuery] Re: Datepicker Plugin Quesiton
On Sun, Feb 15, 2009 at 9:21 PM, Tze Yang Ng ngt...@gmail.com wrote: minDate: new Date() When i use the datepicker, i have the habit of digging through package/ui/ui.datepicker.js to find out the options supported. The Datepicker is documented quite well: Stable (1.5.3): http://docs.jquery.com/UI/API/1.5.3/Datepicker/datepicker Preview (1.6rc6): http://docs.jquery.com/UI/Datepicker#options - Richard
[jQuery] Re: Datepicker Plugin Quesiton
I guess it is just a habit on my part, acessing the online docs can be slow at times from my china office. == On Mon, Feb 16, 2009 at 5:15 PM, Richard D. Worth rdwo...@gmail.com wrote: On Sun, Feb 15, 2009 at 9:21 PM, Tze Yang Ng ngt...@gmail.com wrote: minDate: new Date() When i use the datepicker, i have the habit of digging through package/ui/ui.datepicker.js to find out the options supported. The Datepicker is documented quite well: Stable (1.5.3): http://docs.jquery.com/UI/API/1.5.3/Datepicker/datepicker Preview (1.6rc6): http://docs.jquery.com/UI/Datepicker#options - Richard -- http://ngty77.blogspot.com
[jQuery] Re: Hover vs Click, etc.
Hi, I would add a close button (or link) to your links div and add something like: closeBtn.click( function(){ $(this).parent().hide(); }); alternatively you can do: $(#menuReg).click( function(){ $(this).hide(); return true; }); Than your menu is closed whenever you click somewhere within your menu. If you click on a link, the link will be followed (return true;) by(e) Stephan 2009/2/16 WebRanger david.blomst...@gmail.com: The following script produces a box that opens on mouseover and closes on mouseover. $(\'#triggerReg\').hover(function(){ // do something on mouse over $(\'#menuReg\').show(); },function(){ // do something on mouse out $(\'#menuReg\').hide(); }); It works fine for displaying brief text messages. But if you display a column of links, it closes as soon as you try to put the cursor over a link. Can someone show me how to modify this so that the menu stays open until you manually close it again? I changed hover(function() to click (function(), and it now opens when you click it - and it stays open. But I can't figure out how to close it. I've been searching for online references that list the various options, but I haven't found one I can understand yet. Thanks.
[jQuery] Re: Hover vs Click, etc.
I haven't learned how to make a close button yet. I tried the second method, but I'm doing something wrong. I combined the two scripts as follows, but it doesn't work. $(\'#triggerReg\').click(function(){ $(\'#menuReg\').show(); },function(){ $(#menuReg).click( function(){ $(this).hide(); return true; }); Thanks! * * * * * On Mon, Feb 16, 2009 at 1:41 AM, Stephan Veigl stephan.ve...@gmail.comwrote: Hi, I would add a close button (or link) to your links div and add something like: closeBtn.click( function(){ $(this).parent().hide(); }); alternatively you can do: $(#menuReg).click( function(){ $(this).hide(); return true; }); Than your menu is closed whenever you click somewhere within your menu. If you click on a link, the link will be followed (return true;) by(e) Stephan 2009/2/16 WebRanger david.blomst...@gmail.com: The following script produces a box that opens on mouseover and closes on mouseover. $(\'#triggerReg\').hover(function(){ // do something on mouse over $(\'#menuReg\').show(); },function(){ // do something on mouse out $(\'#menuReg\').hide(); }); It works fine for displaying brief text messages. But if you display a column of links, it closes as soon as you try to put the cursor over a link. Can someone show me how to modify this so that the menu stays open until you manually close it again? I changed hover(function() to click (function(), and it now opens when you click it - and it stays open. But I can't figure out how to close it. I've been searching for online references that list the various options, but I haven't found one I can understand yet. Thanks. -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org
[jQuery] Re: How to make a secured login form
Do you have a skeleton ? On 14 fév, 14:59, EugeneS seuge...@gmail.com wrote: location.href (simply redirection) is so called web 2.0 ? :) web 2.0 is like a google mail where no redirection at all and all the content loaded dynamically. simplest realization can look like: 1) you will have one main script lets name it manager.php to this script you will send different values, and depending on them our manager will include different modules and return HTML which you will insert into some div 2) every module as usually will check if user logged in or not lets say depending on session 2.1) if logged in then show module content etc 2.2) if not then return lets say login form ... this is the basic concept which will work without page refreshing/ redirecting etc ... On Feb 14, 1:07 pm,phicarregam...@bluewin.ch wrote: @james: I forgot to answer to your question ... what I want ? web2.0 style with a solution as you suggested it On 14 fév, 12:03,phicarregam...@bluewin.ch wrote: OK. I understood now. Thank's On 13 fév, 20:07, James james.gp@gmail.com wrote: Okay, here's a simple way to understand it. Suppose in your login.php, if the user login is successful, you have login.php echo '1'. If not, echo something else, like '0'. This response will become stored in the 'msg' variable in your success function in your ajax. success: function(msg) { if (msg == '1') window.location.href = window.location.href; // refresh page else alert('You failed'); }, On Feb 13, 8:50 am,phicarregam...@bluewin.ch wrote: I tried by doing header(Location:welcome.php) but the page is not displayed ??? The first module is waiting for an answer. This is probably that doesn't run ??? Show me how you did it On 13 fév, 19:45, Ashit Vora a.k.v...@gmail.com wrote: Hey, why dont u redirect to Welcome.php page from the page where u r authenticating the user. eg. suppose you make ajax request to auth.php for validation, If validation succeed, redirect to welcome.php (and the ajax request which was waiting for response will die) and if failed, write response back and it will be received by Ajax function waiting for it. I 'm doing this way. and also... If you check session on your welcome.php, and only allow user to continue if the user is validated else redirect back to login page than it doesnt matter even if user gets to know about your welcome.php page If I understood your problem properly than this should help you. Thanks :) On Feb 13, 10:30 am,phicarregam...@bluewin.ch wrote: The question was How to call welcome.php from my jquery script in a secured manner ? because welcome.php is visible from the client side. On 13 fév, 13:19, Rene Veerman rene7...@gmail.com wrote: Rene Veerman wrote: // $pwh = md5 ($users-rec[user_password_hash] . $challenge); Ehm, best to use Either sha256 OR md5 for BOTH fields ofcourse ;) It was a hasty paste.
[jQuery] Re: Hover vs Click, etc.
Hi David, a close button is quite simple, see: http://jsbin.com/ocoyo/edit for an example 1. Why do you escape the quotes in $(\'#triggerReg\')? Is this just a copypaste error, or do you define your function in an HTML attribute? 2. The click handle does take only one callback function (in contrast to hover, which takes two) What exactly does not work? Do you get an error from the browser? Does the menu not open / not close? ... try this: $(#triggerReg).click(function(){ $(#menuReg).show(); return false; }); $(#menuReg).click( function(){ $(#menuReg).hide(); return true; }); by(e) Stephan 2009/2/16 David Blomstrom david.blomst...@gmail.com: I haven't learned how to make a close button yet. I tried the second method, but I'm doing something wrong. I combined the two scripts as follows, but it doesn't work. $(\'#triggerReg\').click(function(){ $(\'#menuReg\').show(); },function(){ $(#menuReg).click( function(){ $(this).hide(); return true; }); Thanks! * * * * * On Mon, Feb 16, 2009 at 1:41 AM, Stephan Veigl stephan.ve...@gmail.com wrote: Hi, I would add a close button (or link) to your links div and add something like: closeBtn.click( function(){ $(this).parent().hide(); }); alternatively you can do: $(#menuReg).click( function(){ $(this).hide(); return true; }); Than your menu is closed whenever you click somewhere within your menu. If you click on a link, the link will be followed (return true;) by(e) Stephan 2009/2/16 WebRanger david.blomst...@gmail.com: The following script produces a box that opens on mouseover and closes on mouseover. $(\'#triggerReg\').hover(function(){ // do something on mouse over $(\'#menuReg\').show(); },function(){ // do something on mouse out $(\'#menuReg\').hide(); }); It works fine for displaying brief text messages. But if you display a column of links, it closes as soon as you try to put the cursor over a link. Can someone show me how to modify this so that the menu stays open until you manually close it again? I changed hover(function() to click (function(), and it now opens when you click it - and it stays open. But I can't figure out how to close it. I've been searching for online references that list the various options, but I haven't found one I can understand yet. Thanks. -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org
[jQuery] Unable to read java script in IE 7 ( its compatible with FF)
Dear all, i am trying to develop a form, i am using jquery ajax function. Although i have develop it and its running properly with FF, when i try to run this using IE 7 its give an error. I have try to this javascript using VS i found IE unable to read (onKeyPress=return onEnter(event,this.form,'client_search') which i have apply in a text box. can any one please told me how can i resolve this problem. Regards Yogendra kaushik
[jQuery] [validate] select box and text field
I'm using the jQuery plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ I have a select box that needs to make a text input required if a specific value in the select box is selected. select name=hfrom option value= selectedSelect/option option value=ReferralReferral/option option value=Media Media/option option value=Industry Conferences Industry Conferences/option option value=Other Other (please specify)/option If they choose OTHER, I need a text input field to be required. I couldn't find this example in the documentation. If it's there, I'm certain I skipped it. Can someone help me out with this? Thanks!
[jQuery] Running Javascript from Ajax Response
I am trying to write my first application, and am trying to use jquery to help me along my travels. I have setup my application to work so all pages are loaded via ajax, using anchor's as navigation. However on some pages that i return using the AJAX i want to be able to run code. This works on firefox, however it does not work on anything else. So really my question is: How do i run javascript code from an ajax response? p form action=ajax/forms.php method=post id=myform Title: input type=text name=title / input type=submit value=Submit name=submit / /form /p script type=text/javascript // attach handler to form's submit event alert(Javascript); $('#myform').submit(function() { // submit the form alert(form submitted); // return false to prevent normal browser submit and page navigation return false; }); /script In the above, i only get an alert saying Javascript in firefox. Any other browser and it does not work. Please help!
[jQuery] Need to include Scroll bars in the Block UI panel
Hi, I was able to display a form in the panel of BlockUI but was not able to bring scroll bars in the same. Is there any property i need to set to enable scrolling? Please help...
[jQuery] JQuery validate remote call allows form submission before call returns
I believe I'm having a sync issue with the remote validate option. The sample form can be found at www.apylon.com/dagangnet. Basically, the issue is that the captcha is set up for remote validation, but before the result can be returned, the form can be submitted. How do I force the form to not submit until the value is returned from the remote call? Thanks
[jQuery] find radio button group value from dynamic form; random group name and id
I have a dynamically generated radio button group. I need to find the value of the button selected, but I don't know the name or id of the radio buttons prior to the form loading. Those elements are dynamically generated. I can attach an onClick event to the table that encloses the option group, but not to the individual options. That's just a constraint I have for this particular form. So my question then, is how to get at the value of the selected item? -- Thanks. My form looks as follows: that looks as follows: form action= method=get name=form2 input name=refTextBox id=refTextBox_ID type=text / table class=Group2 id=Table_ID onClick=? border=0 style=width:200px; tr tdinput id=a_0 type=radio name=abc$a123 value=10 / label for=a_0Monthly -- $10.00 per month/label/td /tr tr tdinput id=a_1 type=radio name=abc$a123 value=100 / label for=a_1Annual -- $100.00 per year/label/td /tr /table /form
[jQuery] Re: Need to include Scroll bars in the Block UI panel
I was able to display a form in the panel of BlockUI but was not able to bring scroll bars in the same. Is there any property i need to set to enable scrolling? Please help... Just give your form an explicit height and set its overflow style to auto. Mike
[jQuery] Getting All DOM Elements except Ones with parent X
Hi, I want to attach an event to all DOM elements except ones who are children of a div with an id of #stylebox. Is there a complex selector that will do that? I got as far as *:not( and then got stumped!!! Thanks in advance James. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website - www.kainos.com
[jQuery] ThickBox / iframe / form
We've been using the following setup for a few years now: jquery + thickbox (iframe option) showing a form that can be used to upload a file Note: on the main page (not the ThickBox modal page) there is a Google Map. When first writing this, it was hard to find a selection of tools that made uploading a file form a modal (ThickBox style) dialog possible. Since updating to jQuery 1.3.1 (we skipped 1.3 due to IE bugs that have since been fixed), the following happens: - everything seems to work normally - when ThickBox returns control to the page, even if the form wasn't submitted, the Google Map becomes unresponsive - FireBug does not show any JavaScript errors - Our ThickBox is line 79 patched, so the @-style selector is no longer used I had to revert back to 1.2.x to make the page work again. Couldn't find any obvious errors, it was just as if the original page was still blocked somehow. The normal form elemtns were responsive htough. Questions: - does anyone recognize this behavior? ThickBox hasn't been updated for a while, seems obvious that it will go out of sync with jQuery if it isn't picked up -- any alternatives that can do the iframe trick? Thanks for your time! Dylan
[jQuery] Re: [validate] select box and text field
There are two variations of the required method that should do the trick: http://docs.jquery.com/Plugins/Validation/Methods/required Jörn On Mon, Feb 16, 2009 at 1:00 PM, Loony2nz loony...@gmail.com wrote: I'm using the jQuery plugin: http://bassistance.de/jquery-plugins/jquery-plugin-validation/ I have a select box that needs to make a text input required if a specific value in the select box is selected. select name=hfrom option value= selectedSelect/option option value=ReferralReferral/option option value=Media Media/option option value=Industry Conferences Industry Conferences/option option value=Other Other (please specify)/option If they choose OTHER, I need a text input field to be required. I couldn't find this example in the documentation. If it's there, I'm certain I skipped it. Can someone help me out with this? Thanks!
[jQuery] Re: JQuery validate remote call allows form submission before call returns
The problem here isn't the remote validation, but the submit-handler you defined outside of the validation. Move the ajaxSubmit into the submitHandler-option to fix it. See also http://jquery.bassistance.de/validate/demo/ajaxSubmit-intergration-demo.html Jörn On Mon, Feb 16, 2009 at 8:35 AM, Tarun tarun.sukh...@gmail.com wrote: I believe I'm having a sync issue with the remote validate option. The sample form can be found at www.apylon.com/dagangnet. Basically, the issue is that the captcha is set up for remote validation, but before the result can be returned, the form can be submitted. How do I force the form to not submit until the value is returned from the remote call? Thanks
[jQuery] Re: jquery cycle plugin. paging multiple divs.
$('#gastroThumbs').cycle({ fx: 'fade', speed: 500, timeout: 0, next: '#next', pager: '#thumbNav' }), $('#gastroBilder').cycle({ fx: 'fade', speed: 500, timeout: 0, next: '#next', pager: '#thumbNav' }); can anybody help, please?! I would expect to see two sets of anchors with the code above. I'd recommend doing something like this for the 2nd slideshow so that the same set of pager links are used: pager: '#thumbNav', pagerAnchorBuilder: function(idx, slide) { // return selector string for existing anchor return '#thumbNav a:eq(' + idx + ')'; } Mike
[jQuery] Re: Getting All DOM Elements except Ones with parent X
I think I answered my own question *:not(#stylebox *) Seems to work Thanks From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of James Hughes Sent: 16 February 2009 12:12 To: jquery-en@googlegroups.com Subject: [jQuery] Getting All DOM Elements except Ones with parent X Hi, I want to attach an event to all DOM elements except ones who are children of a div with an id of #stylebox. Is there a complex selector that will do that? I got as far as *:not( and then got stumped!!! Thanks in advance James. This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website - www.kainos.com This e-mail is intended solely for the addressee and is strictly confidential; if you are not the addressee please destroy the message and all copies. Any opinion or information contained in this email or its attachments that does not relate to the business of Kainos is personal to the sender and is not given by or endorsed by Kainos. Kainos is the trading name of Kainos Software Limited, registered in Northern Ireland under company number: NI19370, having its registered offices at: Kainos House, 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland. Registered in the UK for VAT under number: 454598802 and registered in Ireland for VAT under number: 9950340E. This email has been scanned for all known viruses by MessageLabs but is not guaranteed to be virus free; further terms and conditions may be found on our website - www.kainos.com
[jQuery] Hogging the browser
Hello! I am writing my own jQuery tooltip plugin which loads tooltip data from an external xml file. Now my script seems to have some leak I can't find. After displaying the tooltip a few times I can't interact with other web page elements such as links. I can click on them but they won't take me anywhere. You can find the javascript here: http://paste-it.net/public/i45ed91/ or http://jbubble.woutervandongen.com/data/jbubble-latest-release.js Please help me out on this one! I really need this to work. Thanks in advance :) Wouter
[jQuery] Re: selector best practice
On Feb 16, 5:30 pm, SteelRing steelr...@gmail.com wrote: This may sound stupid to y'all jquery practitioners, but i wonder which method is fastest (recommended) for selecting a cell with a class in a big table (think like 1000+ rows 100+ columns): Fastest: the browser-native getElementsByClassName (recent Firefox, Opera, Safari) is 20 to 40 times faster than $('.className'), as a bonus you get a live collection. Alternatively, XPath is probably just as quick but the result isn't live (supported by the same set of browsers). The jQuery way is to use a CSS selector, however it is much slower than other methods (except perhaps in IE). (#tableid tbody tr.rowclass td.cellclass) or is it (td.cellclass) or (.cellclass). And how about if the cell happens to have a unique id: (#tableid tbody tr#uniquerow td#uniqueid) or just (#uniqueid) If speed really matters, getElementById is more than 7 times faster than $('#...') in Firefox and 4 times faster in Safari. Philosophically, the question being is it better to put as much detail as structurally already known by the programmer into the selector or just anything goes and let jquery handle it as long as it works. There is no selector optimisation that I can see in jQuery other than using getElementById after discovering '#...' (and the overhead of discovering that means it is 4 to 6 times slower than gEBI). As a general rule, keep the selector to a minimum that concisely describes the element - cells must be inside table, table section and row elements, including those in a selector doesn't seem to help. An ID for the starting selector likely does. Do some testing for particular circumstances, the most efficient method will emerge. Don't forget to include browser-native methods where available. -- Rob
[jQuery] Re: Hover vs Click, etc.
Thanks, Stephen; that works beautifully. I used the escape quotes because I'm working in PHP. However, I tried your code without the escape quotes, and it works just fine. I'll have ty give that close button a try, too. Thanks again. * * * * * On Mon, Feb 16, 2009 at 3:36 AM, Stephan Veigl stephan.ve...@gmail.comwrote: Hi David, a close button is quite simple, see: http://jsbin.com/ocoyo/edit for an example 1. Why do you escape the quotes in $(\'#triggerReg\')? Is this just a copypaste error, or do you define your function in an HTML attribute? 2. The click handle does take only one callback function (in contrast to hover, which takes two) What exactly does not work? Do you get an error from the browser? Does the menu not open / not close? ... try this: $(#triggerReg).click(function(){ $(#menuReg).show(); return false; }); $(#menuReg).click( function(){ $(#menuReg).hide(); return true; }); by(e) Stephan 2009/2/16 David Blomstrom david.blomst...@gmail.com: I haven't learned how to make a close button yet. I tried the second method, but I'm doing something wrong. I combined the two scripts as follows, but it doesn't work. $(\'#triggerReg\').click(function(){ $(\'#menuReg\').show(); },function(){ $(#menuReg).click( function(){ $(this).hide(); return true; }); Thanks! * * * * * On Mon, Feb 16, 2009 at 1:41 AM, Stephan Veigl stephan.ve...@gmail.com wrote: Hi, I would add a close button (or link) to your links div and add something like: closeBtn.click( function(){ $(this).parent().hide(); }); alternatively you can do: $(#menuReg).click( function(){ $(this).hide(); return true; }); Than your menu is closed whenever you click somewhere within your menu. If you click on a link, the link will be followed (return true;) by(e) Stephan 2009/2/16 WebRanger david.blomst...@gmail.com: The following script produces a box that opens on mouseover and closes on mouseover. $(\'#triggerReg\').hover(function(){ // do something on mouse over $(\'#menuReg\').show(); },function(){ // do something on mouse out $(\'#menuReg\').hide(); }); It works fine for displaying brief text messages. But if you display a column of links, it closes as soon as you try to put the cursor over a link. Can someone show me how to modify this so that the menu stays open until you manually close it again? I changed hover(function() to click (function(), and it now opens when you click it - and it stays open. But I can't figure out how to close it. I've been searching for online references that list the various options, but I haven't found one I can understand yet. Thanks. -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org -- David Blomstrom Writer Web Designer (Mac, M$ Linux) www.geobop.org
[jQuery] Re: asynchronous, IE, and BlockUI
Mike: If you are validating a form before submitting, or doing validation in a link onclick, you could do synchronous ajax, and when it returns, it could have an event bubble boolean. If return true, then everything is ok, continue submitting the form or clicking the button, if false, then things are not ok, Ajax should popup a dialog and the user can correct things. Granted you could do async, then the ajax coming back could just do a form.submit, but why not give people options? When doing a synchronous ajax call, the blockUI indicator should appear on the screen so the user knows whats going on. Can this be made to work? Thanks, Chris Hyzer On Feb 13, 7:26 pm, Mike Alsup mal...@gmail.com wrote: I have the exact same problem as this post below from a while back, which got no valid response. The reason that I need to usesynchronous calls is that on some ajax submittals we either submit the entire page or return a message to the user, depending on validations - asynchronous will not work for my purposes. Why woudn't async work? That's the driving purpose behind blockUI in the first place. To put up a message while waiting for an async callback. As far as I'm concerned there is no valid use case for using sync ajax. None. Nada. Zero. Mike
[jQuery] jQuery with mod_rewrite
Hi, I'm having problems with jQuery and mod_rewrite. I read someone here before that had problems with it but I couldn't figure out what was wrong with my code. What I do is this, RewriteBase / RewriteRule ^([^.]+)$ /index.php [L] In index.php I then split all / to sepperate variables. For example, /member/edit will tell index.php to include the page member.php, that I do with include member.php, and that variable $_URI['type'] is edit. So now we have $_URI['page'] = member.php, $_URI['type'] = edit In member.php I check what type of function the page should load, here we want to do edit. So I hve this in my code, if($_URI['type'] == edit) { // Do this } But my jQuery code does not work with this. What can I do to make my jQuery code to work? If I change everything and load the page with just member.php? type=edit my code works perfectly, it's my mod_rewrite code that seems to be screwing things up.
[jQuery] Append images to div from JSON
I am trying to append images to a div from a json file, but a don't see the images. They look broken, but the references are ok. What is wrong here? body script type=text/javascript src=http://www.sionvalais.com/v2/js/ jq.js/script script type=text/javascript $(document).ready(function(){ $.getJSON(http://www.sionvalais.com/social/json.php;, function(data){ $.each(data.items, function(i,item){ $(img/).attr(src, item.cam).appendTo(#images); if ( i == 3 ) return false; }); }); }); /script styleimg{ height: 100px; float: left; } #images { width:500px; height:200px; } /style div id=images /div
[jQuery] [Validate] Using title or label for generics errors messages
HI! I'm using jQuery Validate and i'm wondering why it's not possible to use the label field or the title field to display generics errors messages. ex: input type=text title=My Field class=required/ Current display: This field is required. Proposal display: The field My Field is required. With inline error messages, there is no problems, but with an error container, it means that you should override the default message for each control manually. I noticed that could already display arguments into custom messages like Please enter at least {0} characters.. I think it would be great to have the same functionnality with the entry label and/or the title field.
[jQuery] Re: jQuery with mod_rewrite
your question might be better directed at a mod_rewrite group but I'll do my best here. And a few suggestions right off the bat. I would use a framework like codeigniter if you're going to work with URI's like that. It already has built in functionality to work with those sorts of things. another suggestion would be to use === or strcmp() to enforce some sort of type checking on your variable to rule out any inconsistencies there. Can you post your jQuery code as well so that we can check for any possible bugs there? Also, here is a good tutorial on mod_rewrite that might help: http://www.sitepoint.com/article/guide-url-rewriting/ cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: startail ander...@sonic2000.org To: jQuery (English) jquery-en@googlegroups.com Date: 02/16/2009 09:12 AM Subject:[jQuery] jQuery with mod_rewrite Hi, I'm having problems with jQuery and mod_rewrite. I read someone here before that had problems with it but I couldn't figure out what was wrong with my code. What I do is this, RewriteBase / RewriteRule ^([^.]+)$ /index.php [L] In index.php I then split all / to sepperate variables. For example, /member/edit will tell index.php to include the page member.php, that I do with include member.php, and that variable $_URI['type'] is edit. So now we have $_URI['page'] = member.php, $_URI['type'] = edit In member.php I check what type of function the page should load, here we want to do edit. So I hve this in my code, if($_URI['type'] == edit) { // Do this } But my jQuery code does not work with this. What can I do to make my jQuery code to work? If I change everything and load the page with just member.php? type=edit my code works perfectly, it's my mod_rewrite code that seems to be screwing things up. inline: graycol.gifinline: ecblank.gif
[jQuery] Re: asynchronous, IE, and BlockUI
Can this be made to work? No, not in an x-browser way. That's one reason that strictly synchronous processing is a bad idea. You need to introduce at least one async step to pull this off or some browsers will not render the DOM changes made by blockUI until thread execution completes. $('#myButton').click(function() { $.blockUI(); setTimeout(processStuff, 50); }); function processStuff() { // do whatever $.unblockUI(); };
[jQuery] Re: how do i make a menu disappear as user clicks on it?
links are opening a page in a frame. thanks! works as intended (after removing 'return..') (=
[jQuery] Re: Append images to div from JSON
Hi Mark, there seems to be a problem with your json.php. Your output is encapsulated in round bracket and there is a single squared and curly bracket at the end of the output: ( {}{} ]}) your whole JSON output should be of the form: [{},{},...{}] by(e) Stephan 2009/2/16 mark sionval...@gmail.com: I am trying to append images to a div from a json file, but a don't see the images. They look broken, but the references are ok. What is wrong here? body script type=text/javascript src=http://www.sionvalais.com/v2/js/ jq.js/script script type=text/javascript $(document).ready(function(){ $.getJSON(http://www.sionvalais.com/social/json.php;, function(data){ $.each(data.items, function(i,item){ $(img/).attr(src, item.cam).appendTo(#images); if ( i == 3 ) return false; }); }); }); /script styleimg{ height: 100px; float: left; } #images { width:500px; height:200px; } /style div id=images /div
[jQuery] Re: Permission denied to get property HTMLDivElement.parentNode
Usually I also get that error, Permission denied to get property HTMLDivElement.parentNode, just loading HTML with a few jquery lines of code. I have to refresh the web page (F5) to get it disappear. I use jQuery 1.1 and jQueryUI 1.6rc6 On 10 feb, 22:45, Justin jgal...@gmail.com wrote: I've seen various number of posts related to the same issue and some folks think that it's a Mozilla bug (https://bugzilla.mozilla.org/ show_bug.cgi?id=208427) but I'm questioning whether it's really a jQuery bug that should be addressed by re-evaluating 'withinElement' where the problem currently seems to manifest rather than waiting for the Mozilla folks to fix it. FF is after all a very popular browser and this seems to be an easy bug that will very surface quickly. Another search I did yielded some results about people discussing this error due to cross-site scripting exploits and you can not use your web site to access the objects on a different web site. In my case, I'm fairly certain (99%) that my own code isn't loading any script files from other sites so this may not be the problem. I used to have a page that used YUI tabs and within the tab, a table for data display and a form. No matter how many times I hovered and mouse in/out in the input fields, I never saw this error. I then switched over to jQuery tabs along with Flexigrid in lieu of the tab and right away, I'm seeing this error on the same form that did not have this problem earlier. The problem seems to be that element that receives the event (event.relatedTarget) is of class type, 'anonymous-div' and somehow, it's not a node owned by the document from the current site, although I do not know how. I've also changed my form from div to table (some folks in one of the other posts mentioned this) and it had no effect on this bug. Justin
[jQuery] Re: selector best practice
Not going to native methods I'd say the fastest selector without an ID would be $(#tableid td.cellclass) as that will call getElementByID and getElementsByTagName/getElementsByClassName from the #tableid context (or querySelectorAll). Anyway, you only need to add more selectors if you want to enforce the relationships, the more of them the slower it gets. For IDs you should always use just the element's ID. Anything that comes before it will consume parsing time needlessly if the ancestors are not important. - ricardo On Feb 16, 4:30 am, SteelRing steelr...@gmail.com wrote: This may sound stupid to y'all jquery practitioners, but i wonder which method is fastest (recommended) for selecting a cell with a class in a big table (think like 1000+ rows 100+ columns): (#tableid tbody tr.rowclass td.cellclass) or is it (td.cellclass) or (.cellclass). And how about if the cell happens to have a unique id: (#tableid tbody tr#uniquerow td#uniqueid) or just (#uniqueid) Philosophically, the question being is it better to put as much detail as structurally already known by the programmer into the selector or just anything goes and let jquery handle it as long as it works.
[jQuery] Custom ScrollBar
Hello. I am looking for a custom vertical scrollbar plugin. I want to put it in a fluid width / height div, and so far i havent found anything. The only thing i did found is jScrollpane which doesnt like to work with jquery 1.3.1 so if anyone has any info please let me know. Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php
[jQuery] class weirdness in loaded XML?!?
I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this?
[jQuery] Re: class weirdness in loaded XML?!?
why not do this $('span.mycategory').length (I've not worked with jquery and xml so I don't know anything about it) ml1 wrote: I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this?
[jQuery] Re: jQuery Plugin Hello World
On Sunday 15 February 2009, mtsmit2 wrote: The following is a pretty good starting point. http://docs.jquery.com/Plugins/Authoring What is was looking for you. thank you tim
[jQuery] Re: class weirdness in loaded XML?!?
You should wrap your string in '? so your code would be $('span[class*='mycategory'],xml).length cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: ml1 tsummer...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/16/2009 11:08 AM Subject:[jQuery] class weirdness in loaded XML?!? I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this? inline: graycol.gifinline: ecblank.gif
[jQuery] Re: class weirdness in loaded XML?!?
Thank you for the reply, but I'm afraid that doesn't work either. Using your code (after correcting the small typos with the quotes) I tried this: $(span[class*='mycategory'],x).length It still returns zero. On Feb 16, 11:15 am, Michael Lawson mjlaw...@us.ibm.com wrote: You should wrap your string in '? so your code would be $('span[class*='mycategory'],xml).length cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: ml1 tsummer...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/16/2009 11:08 AM Subject: [jQuery] class weirdness in loaded XML?!? I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this? graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] Re: class weirdness in loaded XML?!?
The string does not need to be wrapped in single quotation marks. Also, why does the selector begin with a single quotation mark and end with a double? Are these just typos in the emails? Try this: $('span[class*=mycategory]',xml).length Just one set of single quotation marks, and the closing mark is to the right of the closing bracket. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 16, 2009, at 11:15 AM, Michael Lawson wrote: You should wrap your string in ' so your code would be $('span[class*='mycategory'],xml).length cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' graycol.gifml1 ---02/16/2009 11:08:46 AM---I have something very strange going on trying to create a wrapped set ecblank.gif From: ecblank.gif ml1 tsummer...@gmail.com ecblank.gif To: ecblank.gif jQuery (English) jquery-en@googlegroups.com ecblank.gif Date: ecblank.gif 02/16/2009 11:08 AM ecblank.gif Subject:ecblank.gif [jQuery] class weirdness in loaded XML?!? I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this?
[jQuery] Re: class weirdness in loaded XML?!?
I didn't notice the quotation discrepancy, good catch! Also, I know they're not required, but it's good practice IMHO. cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: Karl Swedberg k...@englishrules.com To: jquery-en@googlegroups.com Date: 02/16/2009 11:31 AM Subject:[jQuery] Re: class weirdness in loaded XML?!? The string does not need to be wrapped in single quotation marks. Also, why does the selector begin with a single quotation mark and end with a double? Are these just typos in the emails? Try this: $('span[class*=mycategory]',xml).length Just one set of single quotation marks, and the closing mark is to the right of the closing bracket. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 16, 2009, at 11:15 AM, Michael Lawson wrote: You should wrap your string in ' so your code would be $('span[class*='mycategory'],xml).length cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' graycol.gifml1 ---02/16/2009 11:08:46 AM---I have something very strange going on trying to create a wrapped set ecblank.gifecblank.gif From:ml1 ?tsummer...@gmail.com ecblank.gifecblank.gif To: jQuery (English) jquery-en@googlegroups.com ecblank.gifecblank.gif Date:02/16/2009 11:08 AM ecblank.gifecblank.gif Subject: [jQuery] class weirdness in loaded XML?!? I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this? inline: graycol.gifinline: ecblank.gif
[jQuery] Re: class weirdness in loaded XML?!?
Tragically none of those quoting variations work. (I've pretty much exhausted every quote variation in my desperate search to try to figure out what's going on.) Any other ideas? Could this possibly be a jquery bug? On Feb 16, 11:35 am, Michael Lawson mjlaw...@us.ibm.com wrote: I didn't notice the quotation discrepancy, good catch! Also, I know they're not required, but it's good practice IMHO. cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: Karl Swedberg k...@englishrules.com To: jquery-en@googlegroups.com Date: 02/16/2009 11:31 AM Subject: [jQuery] Re: class weirdness in loaded XML?!? The string does not need to be wrapped in single quotation marks. Also, why does the selector begin with a single quotation mark and end with a double? Are these just typos in the emails? Try this: $('span[class*=mycategory]',xml).length Just one set of single quotation marks, and the closing mark is to the right of the closing bracket. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Feb 16, 2009, at 11:15 AM, Michael Lawson wrote: You should wrap your string in ' so your code would be $('span[class*='mycategory'],xml).length cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' graycol.gifml1 ---02/16/2009 11:08:46 AM---I have something very strange going on trying to create a wrapped set ecblank.gif ecblank.gif From: ml1 ?tsummer...@gmail.com ecblank.gif ecblank.gif To: jQuery (English) jquery-en@googlegroups.com ecblank.gif ecblank.gif Date: 02/16/2009 11:08 AM ecblank.gif ecblank.gif Subject: [jQuery] class weirdness in loaded XML?!? I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this? graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] jquery plugin not loading
Hi there, i'm trying to use the cycle plugin on my wordpress site. Is there anything i'm unaware of relating to cycle and and jQuery? I've used the cycle plug-in quite a lot, but this is the first time i use it within a wordpress install. As you would, both jquery and cycle are loaded subsequently after the css in the head of the document: ?php wp_enqueue_script('jquery'); ? ?php wp_enqueue_script('cycle','wp-content/themes/MBC/js/ jquery.cycle.all.js','jquery'); ? I'm using wp's enqueue_script tag, i've also tried inclusing them with script And here is the jQuery to trigger the plug-in : script type=text/javascript jQuery(document).ready(function(){ jQuery(#post).cycle('fade'); }); /script On page load nothing happens and firebug returns jQuery(#post).cycle is not a function My guess is that its just not loading the plug-in itself. Is there a way to check that? Or any ideas on why this is hapening? Here is the link to the page : http://www.mybeautifulcity.co.uk/newsite/ Thanks in advance
[jQuery] Re: selector best practice
Umm - that's not true at all. I created a test for you to see: http://dev.jquery.com/~john/ticket/class-speed/ In Firefox 3 I'm getting: ID Raw: 9 ID jQuery: 22 (over 500 queries) Class Raw: 1108 Class jQuery: 778 (over 100 queries) In Safari 3.2 I'm getting: ID Raw: 1 ID jQuery: 3 (over 500 queries) Class Raw: 224 Class jQuery: 184 (over 100 queries) So not only is jQuery's class implementation faster but the ID searching has an approximately 0.026 milliseconds overhead - that's 2.6% of 1 millisecond per query - an absolutely acceptable figure to be able to live with. --John On Mon, Feb 16, 2009 at 8:28 AM, RobG rg...@iinet.net.au wrote: On Feb 16, 5:30 pm, SteelRing steelr...@gmail.com wrote: This may sound stupid to y'all jquery practitioners, but i wonder which method is fastest (recommended) for selecting a cell with a class in a big table (think like 1000+ rows 100+ columns): Fastest: the browser-native getElementsByClassName (recent Firefox, Opera, Safari) is 20 to 40 times faster than $('.className'), as a bonus you get a live collection. Alternatively, XPath is probably just as quick but the result isn't live (supported by the same set of browsers). The jQuery way is to use a CSS selector, however it is much slower than other methods (except perhaps in IE). (#tableid tbody tr.rowclass td.cellclass) or is it (td.cellclass) or (.cellclass). And how about if the cell happens to have a unique id: (#tableid tbody tr#uniquerow td#uniqueid) or just (#uniqueid) If speed really matters, getElementById is more than 7 times faster than $('#...') in Firefox and 4 times faster in Safari. Philosophically, the question being is it better to put as much detail as structurally already known by the programmer into the selector or just anything goes and let jquery handle it as long as it works. There is no selector optimisation that I can see in jQuery other than using getElementById after discovering '#...' (and the overhead of discovering that means it is 4 to 6 times slower than gEBI). As a general rule, keep the selector to a minimum that concisely describes the element - cells must be inside table, table section and row elements, including those in a selector doesn't seem to help. An ID for the starting selector likely does. Do some testing for particular circumstances, the most efficient method will emerge. Don't forget to include browser-native methods where available. -- Rob
[jQuery] Re: jquery plugin not loading
quick and dirty method to see if the .JS file was being pulled in at all would be to stick an alert() in the plugin.js if that works i'd assume there is something wrong with the way the function is being called.
[jQuery] Re: jquery plugin not loading
Nope, its the definitly the plugin that's not being loaded ... Any other ideas? On Feb 16, 5:46 pm, ryan.joyce...@googlemail.com ryan.joyce...@googlemail.com wrote: quick and dirty method to see if the .JS file was being pulled in at all would be to stick an alert() in the plugin.js if that works i'd assume there is something wrong with the way the function is being called.
[jQuery] Having trouble with contextMenu plugin in a frame
Hi, I'm using the context menu plugin from here -- http://www.trendskitchens.co.nz/jquery/contextmenu/. The problem I'm having is that when the functionality is in a frame, right clicking sometimes cuts off part of the menu -- http://screencast.com/t/Z9lGuq5X. I'm wondering if you know of a way to position the menu such that it's fully visible. Thanks for any help, - Dave
[jQuery] Re: jquery plugin not loading
Using Firebug, your link to http://www.mybeautifulcity.co.uk/newsitewp-content/themes/MBC/js/jquery.cycle.all.js?ver=2.7.1 results in a 404 not found error On Feb 16, 12:19 pm, turbodurso india...@gmail.com wrote: Nope, its the definitly the plugin that's not being loaded ... Any other ideas? On Feb 16, 5:46 pm, ryan.joyce...@googlemail.com ryan.joyce...@googlemail.com wrote: quick and dirty method to see if the .JS file was being pulled in at all would be to stick an alert() in the plugin.js if that works i'd assume there is something wrong with the way the function is being called.
[jQuery] Re: Slide on Mouseover
I have a div which is very wide and it's inside of a div which is somewhat thin and has overflow:hidden--I use this as a like a viewport to just show part of the wide div. I have a left and a right arrow and what I want is that when the user puts the mouse on the arrow, then the inner div will slide in that direction, until he takes it off. Many Flash sites work like this. If it will help someone else, I got it now. Here is the full code: !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; lang=en xml:lang=en head titleTest/title script type=text/javascript src=jquery-1.2.6.js/script style #viewport { position: absolute; width :100px; height:100px; overflow :hidden; border: 1px solid red;} #wide { position: relative; width: 1000px; height: 20px; left: 10px;} #slide { width: 20px; background: green; height: 20px; padding-top: 200px; } /style script type=text/javascript var mytimer; $(document).ready(function() { $('#slide a').hover(function(){xxx();},function(){clearTimeout (mytimer)}); } ); function xxx() { nl = $('#wide').css('left'); nl = nl.substr(0,nl.length-2); nl = parseInt(nl)-2; $('#wide').css('left',nl+'px'); mytimer = setTimeout(xxx(),10); } /script /head body div id=viewport div id=wide 1 2 3 4 56 7 8 9 0 abcdefghijoklmnopw iwuer 1 2 3 4 56 7 8 9 0 abcdefghijoklmnopw iwuer 1 2 3 4 56 7 8 9 0 abcdefghijoklmnopw iwuer /div /div div id=slidea href=#mouseover/a/div /body /html
[jQuery] Re: class weirdness in loaded XML?!?
I filed a bug and fixed the issue: http://dev.jquery.com/ticket/4167 --John On Mon, Feb 16, 2009 at 11:40 AM, ml1 tsummer...@gmail.com wrote: Tragically none of those quoting variations work. (I've pretty much exhausted every quote variation in my desperate search to try to figure out what's going on.) Any other ideas? Could this possibly be a jquery bug? On Feb 16, 11:35 am, Michael Lawson mjlaw...@us.ibm.com wrote: I didn't notice the quotation discrepancy, good catch! Also, I know they're not required, but it's good practice IMHO. cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: Karl Swedberg k...@englishrules.com To: jquery-en@googlegroups.com Date: 02/16/2009 11:31 AM Subject:[jQuery] Re: class weirdness in loaded XML?!? The string does not need to be wrapped in single quotation marks. Also, why does the selector begin with a single quotation mark and end with a double? Are these just typos in the emails? Try this: $('span[class*=mycategory]',xml).length Just one set of single quotation marks, and the closing mark is to the right of the closing bracket. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Feb 16, 2009, at 11:15 AM, Michael Lawson wrote: You should wrap your string in ' so your code would be $('span[class*='mycategory'],xml).length cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' graycol.gifml1 ---02/16/2009 11:08:46 AM---I have something very strange going on trying to create a wrapped set ecblank.gifecblank.gif From:ml1 ?tsummer...@gmail.com ecblank.gifecblank.gif To: jQuery (English) jquery-en@googlegroups.com ecblank.gifecblank.gif Date:02/16/2009 11:08 AM ecblank.gifecblank.gif Subject: [jQuery] class weirdness in loaded XML?!? I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this? graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] class bug parsing loaded xml?
Since I seem to be doing the right thing based on the responses given to a previous thread, I want to just verify this thoroughly with you folks before I submit this as a bug report. POSSIBLE BUG: class fails attribute selection TO REPRODUCE: Given the following xml file: myxml span other=myvalueSome content/span span class=myvalueMore content/span /myxml Load this file using $.ajax() into the variable x to hold the xml. The query $('span', x).length returns 2 as expected. The query $('span[other=myvalue]', x).length returns 1 as expected. The query $('span:eq(1)',x).attr('class') returns myvalue as expected HERE'S THE POSSIBLE BUG: The query $('span[class=myvalue]', x).length returns 0 when it should return 1 as above. The query with extra quotes, as in $('span[class=myvalue]', x) also fails.
[jQuery] Re: class weirdness in loaded XML?!?
Holy cow, before I even submitted the bug report! On Feb 16, 1:24 pm, John Resig jere...@gmail.com wrote: I filed a bug and fixed the issue:http://dev.jquery.com/ticket/4167 --John On Mon, Feb 16, 2009 at 11:40 AM, ml1 tsummer...@gmail.com wrote: Tragically none of those quoting variations work. (I've pretty much exhausted every quote variation in my desperate search to try to figure out what's going on.) Any other ideas? Could this possibly be a jquery bug? On Feb 16, 11:35 am, Michael Lawson mjlaw...@us.ibm.com wrote: I didn't notice the quotation discrepancy, good catch! Also, I know they're not required, but it's good practice IMHO. cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: Karl Swedberg k...@englishrules.com To: jquery-en@googlegroups.com Date: 02/16/2009 11:31 AM Subject: [jQuery] Re: class weirdness in loaded XML?!? The string does not need to be wrapped in single quotation marks. Also, why does the selector begin with a single quotation mark and end with a double? Are these just typos in the emails? Try this: $('span[class*=mycategory]',xml).length Just one set of single quotation marks, and the closing mark is to the right of the closing bracket. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Feb 16, 2009, at 11:15 AM, Michael Lawson wrote: You should wrap your string in ' so your code would be $('span[class*='mycategory'],xml).length cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' graycol.gifml1 ---02/16/2009 11:08:46 AM---I have something very strange going on trying to create a wrapped set ecblank.gif ecblank.gif From: ml1 ?tsummer...@gmail.com ecblank.gif ecblank.gif To: jQuery (English) jquery-en@googlegroups.com ecblank.gif ecblank.gif Date: 02/16/2009 11:08 AM ecblank.gif ecblank.gif Subject: [jQuery] class weirdness in loaded XML?!? I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this? graycol.gif 1KViewDownload ecblank.gif 1KViewDownload
[jQuery] Re: class bug parsing loaded xml?
Never mind, the marvelous Mr. Resig noticed the other thread and already found and fixed the bug! See here: http://groups.google.com/group/jquery-en/t/73c2c580766270a0 On Feb 16, 1:34 pm, ml1 tsummer...@gmail.com wrote: Since I seem to be doing the right thing based on the responses given to a previous thread, I want to just verify this thoroughly with you folks before I submit this as a bug report. POSSIBLE BUG: class fails attribute selection TO REPRODUCE: Given the following xml file: myxml span other=myvalueSome content/span span class=myvalueMore content/span /myxml Load this file using $.ajax() into the variable x to hold the xml. The query $('span', x).length returns 2 as expected. The query $('span[other=myvalue]', x).length returns 1 as expected. The query $('span:eq(1)',x).attr('class') returns myvalue as expected HERE'S THE POSSIBLE BUG: The query $('span[class=myvalue]', x).length returns 0 when it should return 1 as above. The query with extra quotes, as in $('span[class=myvalue]', x) also fails.
[jQuery] Re: .load() and timing
The callback function (that in this case is the second parameter in the load function) gets called once snippet has actually returned. That was it. Should have known better, but I really appreciate the input. Thanks!
[jQuery] Nav-Bar functionality
Is there a tweak so the second-level horizontal NavBar will appear when the page is loaded? Here is an example of how I would like this to work: http://www.wildman.com/index.cfm?fa=overview.aboutus I noticed this site uses the jQuery library also. I am using the Joomla implementation as well. Any advise is appreciated. Thanks James
[jQuery] Pass form as argument into its submit event
What I'm trying to do should be very simple. I would like to assign a submit handler to a form and pass that form into the handler (I then wish to interrogate the id of the form argument and perform appropriate validation according to which form it is). The following code doesn't achieve the desired result. Inside the canSubmit function, according to firebug, the form argument seems to be of type form#[object HTMLInputElement] and form.id is undefined. // in domready event handler $('form').submit(function() { return canSubmit(this); }); ... function canSubmit(form) { switch(form.id) { case enhancementForm: ... case newitemForm: ... } return true; } Any pointers would be much appreciated. Clive
[jQuery] Possible to update form inputs after ajax request ?
Hello, I know that thanks to jQuery's ajax functions it's possible to modify part of a webpage after an ajax request. But is it possible to change the text inside the input elements of a form after a request ? What I need to do is the following : - I have 2 forms on a page. One to send a file and one with data inputs - A file is sent to a server to be processed and XML is sent back from the server - I need this XML data to be distributed to several fields of the main form. How can I do this last part ? (I hope I'm clear enough ;) ) Thanks for your advice G.
[jQuery] Toolbar hover sample
We are trying to code for a toolbar used in each li on the page. The goal is to show the toolbar whenever we are hovering over the contents of the li so that we can either edit or delete the content. Is this example, the content is the text within the a tag. We tried to script the code so that span.toolbar was displayed whenever we received a mouseover/out event for toolbar-container. The problem is that as the mouse moves over each element (.toolbar- container, a, .toolbar, img), we lose the context of the parent element, i.e. the parent element receives a mouseout and the child receives a mouseover. I have include sample code below. We have tried NUMEROUS permutations of the code using z-indexes, event delegates, etc. to no avail. I stripped out all but the logging code in hopes of starting with a fairly clean slate. So, can anyone shed some light? I'm not sure if this is the correct forum, but this encompasses jquery (our choice), html and css, so I thought I would take a shot. Please let me know if you would suggest a better venue. Any help would be most appreciated. html head titleToolbar Hover Sample/title script src=jquery.js type=text/javascript/script script src=jquery.delegate.js type=text/javascript/script script $(document).ready( function(){ $('ul').delegate( 'mouseover', 'li', function( event ){ console.log('mouseover li'); }); $('ul').delegate( 'mouseout', 'li', function( event ){ console.log('mouseout li'); }); $('ul').delegate( 'mouseover', '.toolbar-container', function ( event ){ console.log('mouseover .toolbar-container'); }); $('ul').delegate( 'mouseout', '.toolbar-container', function ( event ){ console.log('mouseout .toolbar-container'); }); $('ul').delegate( 'mouseover', 'a', function( event ){ console.log('mouseover a'); }); $('ul').delegate( 'mouseout', 'a', function( event ){ console.log('mouseout a'); }); $('ul').delegate( 'mouseover', '.toolbar', function( event ){ console.log('mouseover .toolbar'); }); $('ul').delegate( 'mouseout', '.toolbar', function( event ){ console.log('mouseout .toolbar'); }); $('ul').delegate( 'mouseover', 'img', function( event ){ console.log('mouseover img'); }); $('ul').delegate( 'mouseout', 'img', function( event ){ console.log('mouseout img'); }); }); /script /head body h1Toolbar Hover Sample/h1 ul li div class=toolbar-container aSuper Secret Stuff/a span class=toolbar style=display:none; img src=edit.png/ img src=delete.png/ /span /div /li /ul /body /html
[jQuery] A Way to view currently bound event handlers
Does anyone know if there is a way to view the function names of the currently bound event handlers for an element? i.e. if I do $ ('.someelem').bind('click', somefunction);, is there a way to check and see if somefunction is bound to the click event of '.someelem'? Thanks in advance
[jQuery] Accordian with Radiobutton List
Has anyone done a radiobuttonlist with accordion in that you select a value and the accordian shows right underneath the selected radio button? I'd only just need to show one collapsed panel. I want to shove in an IFrame into that panel to show the user a website / page scrape in a login form. -- View this message in context: http://www.nabble.com/Accordian-with-Radiobutton-List-tp22043743s27240p22043743.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: Feature Detection Best Practice?
On Feb 16, 2:13 am, Klaus Hartl klaus.ha...@googlemail.com wrote: It's false in IE because it tests for use of the 'opacity' style, not whether the browser has opacity support. Since IE uses filters to achieve opacity this results in a false value. I think it makes sense when you think of it that way. Sure. Although I would have called the property something like $.support.CSS3Opacity or $.support.W3COpacity etc... I still think it's confusing. --Klaus I would think that opacity or boxModel would mean the W3C version of it.
[jQuery] Re: Pass form as argument into its submit event
Is there a reason you can just use the onsubmit event? form id=blah action=blah onsubmit=canSubmit(this) something like that cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: stretch clive.wick...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: 02/16/2009 02:15 PM Subject:[jQuery] Pass form as argument into its submit event What I'm trying to do should be very simple. I would like to assign a submit handler to a form and pass that form into the handler (I then wish to interrogate the id of the form argument and perform appropriate validation according to which form it is). The following code doesn't achieve the desired result. Inside the canSubmit function, according to firebug, the form argument seems to be of type form#[object HTMLInputElement] and form.id is undefined. // in domready event handler $('form').submit(function() { return canSubmit(this); }); ... function canSubmit(form) { switch(form.id) { case enhancementForm: ... case newitemForm: ... } return true; } Any pointers would be much appreciated. Clive inline: graycol.gifinline: ecblank.gif
[jQuery] Re: 1.3.1 Bogs down on table parsing
OK, I rewrote the code, and the page loads a lot faster, but I ran into another problem. Now the performance of the script slows down as the length of the table increases. As I hover over a cell in the above table that triggers the event, it may take a half second or so to trigger. I tested the same script with version 1.2.6, and there is no delay issue. Here is the new code: function setDetail() { $('.detailShowIcon').hide(); // hide all of the detail show icons $('.detailShowIcon').parent().addClass('arrowHidden').css ({width:'20px', height:'18px'}); $('#subject .row').after('div id=hoverPrintercode/code/ div'); // for the arrow detail toggles $('table').find('tr').each(function(i) { var rowId = $(this).attr('id'); if(rowId !rowId.match('detail')) { var hoverArea = '#' + rowId + + 'td#arrow-' + rowId; $(hoverArea).click(function(event) { var thisParent = $(this).parent().attr('id'); var imageRow = '#' + thisParent; var detailDiv = '#detail-' + thisParent; //alert($(event.target).is(imageCellDiv)); if($(imageRow).attr('class') == 'text2') { $(imageRow).attr('class','text4'); $(detailDiv).hide(); } else { $(imageRow).attr('class','text2'); $(detailDiv).show(); } setFooter(); // re-calculate the footer possition }); $(hoverArea).hover(function(event) { var imageRow = '#' + $(this).parent().attr('id'); var imageCellDiv = '#' + $(this).attr('id') + ' div'; if($(imageRow).attr('class') != 'text2') { $(imageRow).attr('class','text4'); $(imageCellDiv).removeClass('arrowHidden'); } else { $(imageCellDiv).removeClass('arrowShow'); } $(imageCellDiv).addClass('arrowActive'); }, function(event) { var imageRow = '#' + $(this).parent().attr('id'); var imageCellDiv = '#' + $(this).attr('id') + ' div'; if($(imageRow).attr('class') != 'text2') { $(imageRow).attr('class','text3'); $(imageCellDiv).removeClass('arrowActive'); $(imageCellDiv).addClass('arrowHidden'); } else { $(imageCellDiv).removeClass('arrowActive'); $(imageCellDiv).addClass('arrowShow'); } }); } }); } On Feb 12, 3:23 pm, zenbaida zenba...@gmail.com wrote: Thanks for the reply. I will try it and let you know how it goes. On Feb 12, 2:02 pm, James james.gp@gmail.com wrote: Try looking into using Event Delegation for managing your events. This means, instead of attaching events to a specific elements (thus, many attachments and more processing time), you're attaching just a single event to the parent element and take actions for the children's events. Here are some links to help:http://www.learningjquery.com/2008/03/working-with-events-part-1http:... On Feb 12, 10:30 am, zenbaida zenba...@gmail.com wrote: I have a table that I am parsing with jQuery. The table is used to show data related to various objects. It alternates between a row with applicable data, and a hidden row that contains other details. The main body of the table is built with multiple html blocks like so: tr class=text3 valign=top id=row01 td id=arrow-row01divimg src=/d-elearn/intranet/inv2/themes/ default/icons/general/disabled_arrow.png alt=Detail Toggle Icons Column width=16 height=16 //div/td tddiv class=inUseIn Use/div/td td{some
[jQuery] jquery context menu plugin: issue with find()
Hi there, Please save the life of those few hairs left on my skull. I've been trying to understand why this doesn't work: i'm using the jquery Context Menu (http://abeautifulsite.net/notebook/80 ) to display a context menu which options vary according to each item. So i'm using a data custom attribute to store which options should be active and the metadata plugin to retrieve the values. Works fine. Now, i need to disable context menu options according to the fetched data, but there, the functionality advertised on the plugin website does not seem to work for me. It is this part of the code which fails: // THE PLUGIN CODE BIT // Disable context menu items on the fly disableContextMenuItems: function(o) { if (o == undefined) { // Disable all $(this).find('li').addClass('disabled'); return ($(this)); } $(this).each(function() { if (o != undefined) { var d = o.split(','); for (var i = 0; i d.length; i++) { console.log('plugin is disabling option : ' + d[i]); // RETURNS A VALID ANSWER $(this).find('a[href=' + d[i] + ']').parent().addClass('disabled'); // THE SELECTOR RETURNS 0 ELEMENTS, ALTHOUGH THE MARKUP IS CORRECT. } } }); return ($(this)); }, // MY SCRIPT // it creates the contextMenu and disables for each file, the relevant options $(a.folderLink).each(function() { var thisFolder = $(this); thisFolder.contextMenu({ menu: 'contextMenu' }, function(action, el, pos) { var url = $(el).attr('href'); var directoryItem = $(el).attr('id'); alert('url : ' + $(el).attr('href') + '\nAction: ' + action + ' \nElement ID: ' + directoryItem); }); // disable non allowed options var menuOptions = thisFolder.metadata({ type: 'attr', name: 'data' }); var optionsToDisable = []; for (var my_option in menuOptions) { if (menuOptions.my_option == '0' || menuOptions.my_option == null || typeof menuOptions.my_option === 'undefined') { optionsToDisable.push('#' + my_option); } } if (optionsToDisable.length 0) { optionsToDisable = optionsToDisable.join(','); //optionsToDisable = ' + optionsToDisable + '; console.log(optionsToDisable = + optionsToDisable); thisFolder.disableContextMenuItems(optionsToDisable); } thisFolder.disableContextMenuItems(); }); So that's it: the issue is with the find() call, which does not find an element that is there in the markup.
[jQuery] Re: Custom ScrollBar
i personally have no issue with jscrollpane and jquery 1.3.1 _ i use it extensively so i suggest that you recheck your code. On Mon, Feb 16, 2009 at 4:29 PM, Alexandru Dinulescu alex.d.a...@gmail.com wrote: Hello. I am looking for a custom vertical scrollbar plugin. I want to put it in a fluid width / height div, and so far i havent found anything. The only thing i did found is jScrollpane which doesnt like to work with jquery 1.3.1 so if anyone has any info please let me know. Thanks --- Alexandru Dinulescu Web Developer (X)HTML/CSS Specialist Expert Guarantee Certified Developer XHTML: http://www.expertrating.com/transcript.asp?transcriptid=1879053 CSS : http://www.expertrating.com/transcript.asp?transcriptid=1870619 RentACoder Profile: http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=6995323 MainWebsite: http://alexd.adore.ro Portofolio: http://alexd.adore.ro/project_page.php
[jQuery] Does IE simply not work or...
Or is there a common work around? I spent a few days getting familiar with JQuery and it works perfectly in Firefox. I go to test it in IE and literally nothing works. Aside from the basics, I'm using a validator plugin, but I'm getting JS errors at every turn. Vague errors like object expected when I'm simply calling a JS function that uses JQuery calls. IE is very frustrating, they should just shoot it and put us out of our misery.
[jQuery] Re: A Way to view currently bound event handlers
This Visual Event bookmarklet might help: http://www.sprymedia.co.uk/article/Visual+Event --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 16, 2009, at 1:43 PM, jtrim wrote: Does anyone know if there is a way to view the function names of the currently bound event handlers for an element? i.e. if I do $ ('.someelem').bind('click', somefunction);, is there a way to check and see if somefunction is bound to the click event of '.someelem'? Thanks in advance
[jQuery] parent function value
Hello, I'm new in javascript and jquery, and i need little help. function checkUsername(name) { function checkUsername(name) { $.post(prefix+'/registration/checkUsername', {username:name.val()},function(data){if (data == 'yes'){name.addClass ('ui-state-error'); updateTips('Username taken'); return false} else {return true} }); } How can I set checkUsername to true or false from function(data) which is communicating with my php code. Thanks.
[jQuery] jQuery Ajax XML not working in IE6(most people)
Hello, I have been looking at this for a few days now and I am not having any luck. I am using jQuery 3.1.1. I don't think I have any character encoding issues, all files are in UTF-8 format. Is it possible that I left a header out when creating the XML file - like the doctype=text/xml? If so how do I make sure this is added? Well thanks for taking a look. :D MY HTML + JS --- !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http:// www.w3.org/TR/html4/loose.dtd html head meta http-equiv=Content-Type content=charset=utf-8 titleNew Products/title script type=text/javascript src=/includes/jQuery/jquery.js language=JavaScript/script script type=text/javascript language=javascript !-- $(document).ready(function(){ $.ajax({ url: '/includes/xml/newProducts.xml', type: 'GET', dataType: 'xml', timeout: 2000, error: function (xhr, desc, exceptionobj) { alert(xhr.responseText); }, success: function(reply){ //find every productsRow and print the gpn $(reply).find('productsRow').each(function(){ $(#output).replaceWith($(this).find(gpn).text()+ 'br /'); }); } }); }); -- /script /head body h4New Products Feed Hello World/h4 div id=outputTarget Output DIV/div /body /html --- MY XML --- ?xml version=1.0 encoding=utf-8? products productsRow gpn1N4148WS/gpn gpnDescriptionSmall Signal Diode/gpnDescription productFamilySmall Signal Diode/productFamily productFolderLink/pf/1N/1N4148WS.html/productFolderLink datasheetLink/ds/1N/1N4148WS.pdf/datasheetLink buyLink/ShoppingExperience/action/displayItems? gpn=1N4148WSamp;itemType=BUY/buyLink sampleLink/ShoppingExperience/action/displayItems? gpn=1N4148WSamp;itemType=SAMPLE/sampleLink orderableParts partsRow opn1N4148WS/opn packageIdSOD-323F/packageId partStatusS/partStatus greenStatusY/greenStatus dateStamp04/14/2008/dateStamp pinNumber2/pinNumber /partsRow /orderableParts /productsRow productsRow gpn1N4148WT/gpn gpnDescriptionSmall Signal Diode/gpnDescription productFamilySmall Signal Diode/productFamily productFolderLink/pf/1N/1N4148WT.html/productFolderLink datasheetLink/ds/1N/1N4148WT.pdf/datasheetLink buyLink/ShoppingExperience/action/displayItems? gpn=1N4148WTamp;itemType=BUY/buyLink sampleLink/ShoppingExperience/action/displayItems? gpn=1N4148WTamp;itemType=SAMPLE/sampleLink orderableParts partsRow opn1N4148WT/opn packageIdSOD523F/packageId partStatusS/partStatus greenStatusY/greenStatus dateStamp03/06/2008/dateStamp pinNumber/pinNumber /partsRow /orderableParts /productsRow productsRow gpn1N4448WS/gpn gpnDescriptionSmall Signal Diode/gpnDescription productFamilySmall Signal Diode/productFamily productFolderLink/pf/1N/1N4448WS.html/productFolderLink datasheetLink/ds/1N/1N4448WS.pdf/datasheetLink buyLink/ShoppingExperience/action/displayItems? gpn=1N4448WSamp;itemType=BUY/buyLink sampleLink/ShoppingExperience/action/displayItems? gpn=1N4448WSamp;itemType=SAMPLE/sampleLink orderableParts partsRow opn1N4448WS/opn packageIdSOD-323F/packageId partStatusS/partStatus greenStatusY/greenStatus dateStamp04/14/2008/dateStamp pinNumber2/pinNumber /partsRow /orderableParts /productsRow /products ---
[jQuery] how do I code jquery image gallery inside ajax tabs?
They both work on their own, but when I click on the ajax tab that contains the image gallery html, its just a blank page? What do I need to change to get this to work? Thanks, Arianna
[jQuery] html() in an iframe
I'm attempting to get the contents of the page -- its HTML code. Everything always returns null. Here is what I tried: var details = $('#xEditingArea').html(); alert(a+details); -- returns null var details = $('#xEditingArea iframe html body').html(); alert(b+details); -- returns null The page is using fckeditor and I need the contents of the fckeditor which uses numerous iframes. The tags are these: xEditingArea is the id of the td tag that then contains an iframe. The iframe contains html then body tags. None of these have any identifying characteristics put on them by the fckeditor so I can't retrieve them using an id. Is there something in jquery that prevents it from returning the html? Is it the iframes that is causing the problem? I've tried hundreds of combinations and can't figure it out. I am doing an autosave and it used to work with niceditor but then I had to switch over to fckeditor and found this problem. I've spent 3 hours and have gotten nowhere. Any help would be appreciated.
[jQuery] Re: Does IE simply not work or...
a link to a test page would help us diagnose your problem. or at least a little of your code. --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 16, 2009, at 3:58 PM, Dean C. Reed wrote: Or is there a common work around? I spent a few days getting familiar with JQuery and it works perfectly in Firefox. I go to test it in IE and literally nothing works. Aside from the basics, I'm using a validator plugin, but I'm getting JS errors at every turn. Vague errors like object expected when I'm simply calling a JS function that uses JQuery calls. IE is very frustrating, they should just shoot it and put us out of our misery.
[jQuery] Re: html() in an iframe
Try $('#xEditingArea').contents().find('body').html() On Mon, Feb 16, 2009 at 3:31 PM, webdeveloperintexas prove.faith...@gmail.com wrote: I'm attempting to get the contents of the page -- its HTML code. Everything always returns null. Here is what I tried: var details = $('#xEditingArea').html(); alert(a+details); -- returns null var details = $('#xEditingArea iframe html body').html(); alert(b+details); -- returns null The page is using fckeditor and I need the contents of the fckeditor which uses numerous iframes. The tags are these: xEditingArea is the id of the td tag that then contains an iframe. The iframe contains html then body tags. None of these have any identifying characteristics put on them by the fckeditor so I can't retrieve them using an id. Is there something in jquery that prevents it from returning the html? Is it the iframes that is causing the problem? I've tried hundreds of combinations and can't figure it out. I am doing an autosave and it used to work with niceditor but then I had to switch over to fckeditor and found this problem. I've spent 3 hours and have gotten nowhere. Any help would be appreciated.
[jQuery] listnav related - DL
I have a need for the listnav plugin to work for definition lists. http://www.ihwy.com/Labs/jquery-listnav-plugin.aspx Since the plugin breaks the lists up alphabetically it seems like it would make the most sense for definition lists but the Features section only mentions it working for ordered and unordered lists.
[jQuery] Re: class weirdness in loaded XML?!?
No problem man. In the future feel free to bring issues like this up on the jquery-dev list - we can diagnose or fix the problem quite quickly. Thanks for spotting this! --John On 2/16/09, ml1 tsummer...@gmail.com wrote: Holy cow, before I even submitted the bug report! On Feb 16, 1:24 pm, John Resig jere...@gmail.com wrote: I filed a bug and fixed the issue:http://dev.jquery.com/ticket/4167 --John On Mon, Feb 16, 2009 at 11:40 AM, ml1 tsummer...@gmail.com wrote: Tragically none of those quoting variations work. (I've pretty much exhausted every quote variation in my desperate search to try to figure out what's going on.) Any other ideas? Could this possibly be a jquery bug? On Feb 16, 11:35 am, Michael Lawson mjlaw...@us.ibm.com wrote: I didn't notice the quotation discrepancy, good catch! Also, I know they're not required, but it's good practice IMHO. cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' From: Karl Swedberg k...@englishrules.com To: jquery-en@googlegroups.com Date: 02/16/2009 11:31 AM Subject:[jQuery] Re: class weirdness in loaded XML?!? The string does not need to be wrapped in single quotation marks. Also, why does the selector begin with a single quotation mark and end with a double? Are these just typos in the emails? Try this: $('span[class*=mycategory]',xml).length Just one set of single quotation marks, and the closing mark is to the right of the closing bracket. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Feb 16, 2009, at 11:15 AM, Michael Lawson wrote: You should wrap your string in ' so your code would be $('span[class*='mycategory'],xml).length cheers Michael Lawson Content Tools Developer, Global Solutions, ibm.com Phone: 1-919-517-1568 Tieline: 255-1568 E-mail: mjlaw...@us.ibm.com 'Examine my teachings critically, as a gold assayer would test gold. If you find they make sense, conform to your experience, and don't harm yourself or others, only then should you accept them.' graycol.gifml1 ---02/16/2009 11:08:46 AM---I have something very strange going on trying to create a wrapped set ecblank.gifecblank.gif From:ml1 ?tsummer...@gmail.com ecblank.gifecblank.gif To: jQuery (English) jquery-en@googlegroups.com ecblank.gifecblank.gif Date:02/16/2009 11:08 AM ecblank.gifecblank.gif Subject: [jQuery] class weirdness in loaded XML?!? I have something very strange going on trying to create a wrapped set of elements from an xml file loaded via jquery's xmlhttprequest. The xml has a number of entries with class attributes that have multiple values, ie span class=mycategory mychoice ../span When I use this selector: $('span[class*=mycategory],xml).length jquery returns zero. Weirdly if I do exactly the same thing but use a different attribute name from class in the xml and the query, it works perfectly. If I use this method I get the expected result: $('span').attr('class') It returns mycategory mychoice Is there something special about the class attribute in xml that is causing this? graycol.gif 1KViewDownload ecblank.gif 1KViewDownload -- --John
[jQuery] clone form information
sometimes we have two form that almost the same fields, so we will give client a clone button if the information is complete the same, this is how I do now, is there any easy way to accomplish that? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleclone form/title style type=text/css !-- body { font-size: 12px; } div.box { width: 500px; border: 1px solid #00; padding: 6px; margin: 0 0 6px 0; } -- /style script type=text/javascript src=js/jquery-1.3.1.js/script /head body div class=box form method=post name=form1 id=form1 label for=namename/label input name=name type=text id=name value=David / br / label input name=gender type=radio id=gender_0 value=1 checked=checked / male/label br / label input type=radio name=gender value=0 id=gender_1 / female/label br / input type=checkbox id=clone /label for=cloneclone/label /form /div div class=box form method=post name=form2 id=form2 label for=name2name2/label input type=text name=name2 id=name2 / label br / input type=radio name=gender2 value=1 id=gender2_0 / male/label br / label input type=radio name=gender2 value=0 id=gender2_1 / female/label br / /form /div script language=javascript !-- $(function() { /*if click checkbox clone*/ $('input#clone').click(function() { $name = $('form#form1 input#name'); $gender = $('form#form1 input[name=gender]'); $name2 = $('form#form2 input#name2'); $gender2 = $('form#form2 input[name=gender2]'); /* * check if it been checked * if checked clone the information * if not checked clear form2's value */ if ($(this).is(':checked')) { $name2.val($name.val()); $gender.each(function() { if ($(this).is(':checked')) { $gender2.eq($gender.index(this)).attr('checked', true); } }); } else { $name2.val(''); $gender2.attr('checked', false); } }); }); -- /script /body /html
[jQuery] Table sorter pager and live search problem
Hi all Can some body please tell me the solution to this problem... I have 2 tables on page and 2 pagers. Both table have different height but same width. Each of them occupy 50% of page width . one is on left other is on right.. the problem is the pager of 1st table is using the height of second table pager. When I put an alert in pager.js file ... I can see different height for pager for both tables but finally it comes back to second table pager height.. also , I am using live search plugin: it works well until I have all records on same page like I can only find something in the table which is on that page If i have 40 records ... and I am showing 10 on 1st page , 10 on second and so on... it just finds from those 10 records which I am seeing on the page and not the entire table records.. here is the code I am using: $('.tablesorter tbody tr').quicksearch({ position: 'before', attached: '.tablesorter', stripeRowClass: ['odd', 'even'], labelText: 'Search the table' }); //table sorter plugin for table on page $(.tablesorter) .tablesorter({ widthFixed: true, widgets: ['zebra'] }) .tablesorterPager({ container: $(#pager) }) Plz help! Thanks Varun
[jQuery] Problem's with tinymce on overlay
Hi everyone, I have some troubleshoots with including tinymce editor on the ui block http://malsup.com/jquery/block/. When I set up the editor on the ui block overlay, the tinymce scripts are no correctly loaded, the effect is, the editor behavior is like disabled( I can't put any char).Have any one resolved, or meet with this problem? I will be gratefull for any help.
[jQuery] Re: Does IE simply not work or...
And rest assured that the library (including the validation plugin) FULLY work with IE, it's your code and how you are using jQuery that is the issue On Feb 16, 3:58 pm, Dean C. Reed webspee...@gmail.com wrote: Or is there a common work around? I spent a few days getting familiar with JQuery and it works perfectly in Firefox. I go to test it in IE and literally nothing works. Aside from the basics, I'm using a validator plugin, but I'm getting JS errors at every turn. Vague errors like object expected when I'm simply calling a JS function that uses JQuery calls. IE is very frustrating, they should just shoot it and put us out of our misery.
[jQuery] Re: Superfish - Still Need Help - Vertical Menu
www.royalmbc.org/joomla I would appreciate your help! Thank you! On Feb 15, 11:47 am, bellaluna316 bellaluna...@gmail.com wrote: In IE 8 FF 3.0.6, my vertical sub-menus are only displaying a partial link. I've tried a couple suggestions and played with some of the z-indexes but can't find the fix. They display fine in IE7. Any help would be greatly appreciated!
[jQuery] Re: Superfish - Still Need Help - Vertical Menu
First thing to do is deal with the conflict between Mootools and jQuery. Firebug reports this on page load: jQuery(ul.sf-menu).superfish is not a function See this: http://docs.jquery.com/Using_jQuery_with_Other_Libraries --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Feb 16, 2009, at 6:26 PM, bellaluna316 wrote: www.royalmbc.org/joomla I would appreciate your help! Thank you! On Feb 15, 11:47 am, bellaluna316 bellaluna...@gmail.com wrote: In IE 8 FF 3.0.6, my vertical sub-menus are only displaying a partial link. I've tried a couple suggestions and played with some of the z-indexes but can't find the fix. They display fine in IE7. Any help would be greatly appreciated!
[jQuery] Re: how do I code jquery image gallery inside ajax tabs?
Might help others help you if 1) You specify *which* ajax tabs you are using 2) some sample of code of what works and what doesn't work On Feb 16, 3:57 pm, Arianna ta...@studio-taj.com wrote: They both work on their own, but when I click on the ajax tab that contains the image gallery html, its just a blank page? What do I need to change to get this to work? Thanks, Arianna
[jQuery] Re: how do I code jquery image gallery inside ajax tabs?
Hi There, Im using the jquery cycle plug in with jquery ui tabs. Both work fine on their own but the cycle plugin wont show when I put the html page under one of the ui tabs. Talya MorningZ wrote: Might help others help you if 1) You specify *which* ajax tabs you are using 2) some sample of code of what works and what doesn't work On Feb 16, 3:57 pm, Arianna ta...@studio-taj.com wrote: They both work on their own, but when I click on the ajax tab that contains the image gallery html, its just a blank page? What do I need to change to get this to work? Thanks, Arianna -- View this message in context: http://www.nabble.com/how-do-I-code-jquery-image-gallery-inside-ajax-tabs--tp22046389s27240p22048799.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: html() in an iframe
I tried that and it did not work. On Feb 16, 4:04 pm, brian bally.z...@gmail.com wrote: Try $('#xEditingArea').contents().find('body').html() On Mon, Feb 16, 2009 at 3:31 PM, webdeveloperintexas prove.faith...@gmail.com wrote: I'm attempting to get the contents of the page -- its HTML code. Everything always returns null. Here is what I tried: var details = $('#xEditingArea').html(); alert(a+details); -- returns null var details = $('#xEditingArea iframe html body').html(); alert(b+details); -- returns null The page is using fckeditor and I need the contents of the fckeditor which uses numerous iframes. The tags are these: xEditingArea is the id of the td tag that then contains an iframe. The iframe contains html then body tags. None of these have any identifying characteristics put on them by the fckeditor so I can't retrieve them using an id. Is there something in jquery that prevents it from returning the html? Is it the iframes that is causing the problem? I've tried hundreds of combinations and can't figure it out. I am doing an autosave and it used to work with niceditor but then I had to switch over to fckeditor and found this problem. I've spent 3 hours and have gotten nowhere. Any help would be appreciated.
[jQuery] Re: selector best practice
On Feb 17, 2:43 am, John Resig jere...@gmail.com wrote: On Mon, Feb 16, 2009 at 8:28 AM, RobG rg...@iinet.net.au wrote: On Feb 16, 5:30 pm, SteelRing steelr...@gmail.com wrote: This may sound stupid to y'all jquery practitioners, but i wonder which method is fastest (recommended) for selecting a cell with a class in a big table (think like 1000+ rows 100+ columns): Fastest: the browser-native getElementsByClassName (recent Firefox, Opera, Safari) is 20 to 40 times faster than $('.className'), as a bonus you get a live collection. Alternatively, XPath is probably just as quick but the result isn't live (supported by the same set of browsers). The jQuery way is to use a CSS selector, however it is much slower than other methods (except perhaps in IE). (#tableid tbody tr.rowclass td.cellclass) or is it (td.cellclass) or (.cellclass). And how about if the cell happens to have a unique id: (#tableid tbody tr#uniquerow td#uniqueid) or just (#uniqueid) If speed really matters, getElementById is more than 7 times faster than $('#...') in Firefox and 4 times faster in Safari. Philosophically, the question being is it better to put as much detail as structurally already known by the programmer into the selector or just anything goes and let jquery handle it as long as it works. There is no selector optimisation that I can see in jQuery other than using getElementById after discovering '#...' (and the overhead of discovering that means it is 4 to 6 times slower than gEBI). Umm - that's not true at all. Which part? Are you referring to selector optimisation or that $() isn't slower? I created a test for you to see:http://dev.jquery.com/~john/ticket/class-speed/ In Firefox 3 I'm getting: ID Raw: 9 ID jQuery: 22 (over 500 queries) Class Raw: 1108 Class jQuery: 778 (over 100 queries) In Safari 3.2 I'm getting: ID Raw: 1 ID jQuery: 3 (over 500 queries) Class Raw: 224 Class jQuery: 184 (over 100 queries) Interesting, here's my results: Safari 3.2, 1GHz PowerPc G4: ID Raw: 7 ID jQuery: 23 Class Raw: 1744 Class jQuery: 5361 Browser-native is 3 times faster for both. Mobile Safari, iPhone 3G: ID Raw: 95 ID jQuery: 296 Class Raw: 8789 Class jQuery: 34594 Browser-native is 3 times faster for ID, 4 times for class. Firefox 3.0, 3GHz P4: ID Raw: 11 ID jQuery: 27 Class Raw: 1579 Class jQuery: 1141 Browser-native is nearly 3 times faster for ID, 40% slower for class. Safari 3.2, 3GHz P4: ID Raw: 5 ID jQuery: 11 Class Raw: 249 Class jQuery: 1107 Browser-native is 2 times faster for ID, 5 times faster for class. So not only is jQuery's class implementation faster According to my tests, only in Firefox so I have reservations about that. but the ID searching has an approximately 0.026 milliseconds overhead - that's 2.6% of 1 millisecond per query - an absolutely acceptable figure to be able to live with. The speed for a single call isn't really an issue; it's the relative performance, particularly on low specification hardware. Getting an element by ID is usually a single call so $(#) is fast enough for most cases. The speed penalty is relevant when there is a requirement to do many quickly. The test of the class selector seems a bit trivial: whenever a javascript method is faster than its browser-native equivalent further investigation is called for. If the selector is forced to do a bit of work by nesting the elements that it must find, the speed advantage in Firefox is pretty quickly nullified. The test below randomises the ID so 90% of the time it will be different to the one previous, the class name 33%. Optimising the class selector may improve performance with $(), however it is also pretty easy to slow it down with a poorly chosen selector. It's speed doesn't come close to the browser-native methods in Firefox or Safari where the elements are nested a little. On the P4 noted above, I get: Safari 3.2: gEBI: 9 $(#): 30 gEBCN: 10 $(CSS selector): 85 Firefox 3.0: gEBI: 14 $(#): 57 gEBCN: 22 $(CSS selector): 640 ++ !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html head titlejQuery selectors/title script type=text/javascript src=jquery-1.3.1.js/script script type=text/javascript function doIt(n) { var numSet = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; var numLen = numSet.length; var i, t0, t1, t2, t3; var msg = []; var getNum = function() { return (Math.random()*numLen)|0; } var classes = ['foo', 'bar', 'eke']; var cLen = classes.length; var getClass = function() { return '.' + classes[(Math.random()*cLen)|0]; } // Test getting by ID i = n; t0 = new Date(); while (i--) { document.getElementById('p' + getNum()); } t1 = new Date(); i = n; t2 = new Date(); while (i--) { $('#p' + getNum()); } t3 = new
[jQuery] Re: jQuery validation question: validating multiple email inputs
So far, I have adapted this: email: function(value, element) { return this.optional(element) || /^((([a-z]|\d|[!#\$%'\*\+\-\/=\? \^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\ $%'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+) *)|((\x22)\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c \x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF \uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900- \uFDCF\uFDF0-\uFFEF]*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)? (\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a- z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~| [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF \uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF \uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a- z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]| [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value); }, into this: email: function(value, element) { var emails = value.split(,); for(var emailAddress in emails) { return this.optional(element) || /^((([a-z]|\d|[!#\$%'\*\+\-\/=\? \^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\ $%'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+) *)|((\x22)\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c \x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF \uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900- \uFDCF\uFDF0-\uFFEF]*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)? (\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a- z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~| [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF \uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF \uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a- z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]| [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(emailAddress); } }, any thoughts why this is not working? Thanks, On Feb 13, 11:10 am, Ed Lerner emle...@gmail.com wrote: I'm new to jQuery as well. In other languages, you would take the string that holds all of the emails and do a 'split' on commas. This should give you an array where each element is an individual email. From there, just validate each element. How to do this in jQuery, someone more experienced than I may be able to help with. On Feb 13, 11:28 am,roryreiffroryre...@gmail.com wrote: Hi there, I am using the Validation plugin to validate a form that emails the current pages URL to the recipients entered in to the email to field. I want to validate that field for multiple emails addressed separated by commas...and ideas on how to do this? I'm a bit new to jQuery so I am a little confused how to approach this. I was thinking somehow altering the email function so that is parses the input and does a for each on every email address. Is this correct thinking? Is there an easier way to do this? Thanks,
[jQuery] Re: jQuery validation question: validating multiple email inputs
Allow me to show you what I have so far. It seems to validate base on the first email, but none of the successive ones, in regards to the to field: http://www.pomona.edu/asp/mailthis-redux.asp On Feb 16, 4:53 pm, roryreiff roryre...@gmail.com wrote: So far, I have adapted this: email: function(value, element) { return this.optional(element) || /^((([a-z]|\d|[!#\$%'\*\+\-\/=\? \^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\ $%'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+) *)|((\x22)\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c \x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF \uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900- \uFDCF\uFDF0-\uFFEF]*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)? (\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a- z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~| [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF \uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF \uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a- z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]| [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(value); }, into this: email: function(value, element) { var emails = value.split(,); for(var emailAddress in emails) { return this.optional(element) || /^((([a-z]|\d|[!#\$%'\*\+\-\/=\? \^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\ $%'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+) *)|((\x22)\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c \x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF \uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900- \uFDCF\uFDF0-\uFFEF]*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)? (\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a- z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~| [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF \uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF \uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a- z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]| [\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(emailAddress); } }, any thoughts why this is not working? Thanks, On Feb 13, 11:10 am, Ed Lerner emle...@gmail.com wrote: I'm new to jQuery as well. In other languages, you would take the string that holds all of the emails and do a 'split' on commas. This should give you an array where each element is an individual email. From there, just validate each element. How to do this in jQuery, someone more experienced than I may be able to help with. On Feb 13, 11:28 am,roryreiffroryre...@gmail.com wrote: Hi there, I am using the Validation plugin to validate a form that emails the current pages URL to the recipients entered in to the email to field. I want to validate that field for multiple emails addressed separated by commas...and ideas on how to do this? I'm a bit new to jQuery so I am a little confused how to approach this. I was thinking somehow altering the email function so that is parses the input and does a for each on every email address. Is this correct thinking? Is there an easier way to do this? Thanks,
[jQuery] how to zebra stripe divs?
Hi I'm just wondering whether it is possible to zebra stripe alternate divs with the same class name? The class name is .postSummary-teaser, I tried this: script type=text/javascript window.onload = function(){ $(div:.postSummary-teaser(odd)).addClass(odd); }; /script but no joy. I'm no Javascript programmer but it was easy to stripe alternate rows with a tutorial on the jQuerey site. There seems to be nothing about using divs? The page in question is in development here: http://www.digiflipconcepts.com/digiflip-v3/Rant-and-Rave Can anyone help? thanks -- View this message in context: http://www.nabble.com/how-to-zebra-stripe-divs--tp22048135s27240p22048135.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Callback no being executed from a post call...
I am having a problem, The callback function I am passing to the jquery post request is not executing the success callback on a successful reply from my servlet: Here are some code snippets of what I am trying to do: top of my file: if (Ajax == null || typeof(Ajax) != object) { var Ajax = new Object ();} Ajax.callBack = function(data, textStatus) { alert('in callback'); } Ajax.call = function (url, formValues) { $.post(url, formValues ,function(data, textStatus) { Ajax.callBack (data, textStatus); }, html); } I have also tried: Ajax.call = function (url, formValues) { $.post(url, formValues ,Ajax.callBack, html); } I examined the return of the $.post call and the XMLHttpRequest is returning a status of 200, and the responseText variable has the correct data. (I have examined them using FireBug). Also no exeception is being thrown. I have found if I use just this, the alert pops up Ajax.call = function (url, formValues) { $.post(url, formValues ,function(data, textStatus) { alert (hello); }, html); } Thanks in advance
[jQuery] Re: how to zebra stripe divs?
your colon is in the wrong place. (how often does one get to say that?) $(div.postSummary-teaser:odd).addClass(odd); stephen On Mon, Feb 16, 2009 at 15:31, morktron m...@digiflip.tv wrote: Hi I'm just wondering whether it is possible to zebra stripe alternate divs with the same class name? The class name is .postSummary-teaser, I tried this: script type=text/javascript window.onload = function(){ $(div:.postSummary-teaser(odd)).addClass(odd); }; /script but no joy. I'm no Javascript programmer but it was easy to stripe alternate rows with a tutorial on the jQuerey site. There seems to be nothing about using divs? The page in question is in development here: http://www.digiflipconcepts.com/digiflip-v3/Rant-and-Rave Can anyone help? thanks -- View this message in context: http://www.nabble.com/how-to-zebra-stripe-divs--tp22048135s27240p22048135.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: IE Help
I appreciate the tactful way you said, Hey, dumbass, what the hell is wrong w/ you J it's not that at all... but time and time and time again people on this mailing group don't make it very easy for others to help them out
[jQuery] Re: how to zebra stripe divs?
I'm just curious... where are you getting your syntax from? div:.postSummary .postSummary-teaser(odd) ?? there's now where in the documentation (http://docs.jquery.com) where that syntax is shown On Feb 16, 6:31 pm, morktron m...@digiflip.tv wrote: Hi I'm just wondering whether it is possible to zebra stripe alternate divs with the same class name? The class name is .postSummary-teaser, I tried this: script type=text/javascript window.onload = function(){ $(div:.postSummary-teaser(odd)).addClass(odd);}; /script but no joy. I'm no Javascript programmer but it was easy to stripe alternate rows with a tutorial on the jQuerey site. There seems to be nothing about using divs? The page in question is in development here:http://www.digiflipconcepts.com/digiflip-v3/Rant-and-Rave Can anyone help? thanks -- View this message in context:http://www.nabble.com/how-to-zebra-stripe-divs--tp22048135s27240p2204... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: how to zebra stripe divs?
Thanks Stephen, I suppose it's usually only doctors who say your colon is in the wrong place ;), unfortunately it still doesn't work :(, I appreciate your help though 2009/2/17 aquaone aqua...@gmail.com your colon is in the wrong place. (how often does one get to say that?) $(div.postSummary-teaser:odd).addClass(odd); stephen On Mon, Feb 16, 2009 at 15:31, morktron m...@digiflip.tv wrote: Hi I'm just wondering whether it is possible to zebra stripe alternate divs with the same class name? The class name is .postSummary-teaser, I tried this: script type=text/javascript window.onload = function(){ $(div:.postSummary-teaser(odd)).addClass(odd); }; /script but no joy. I'm no Javascript programmer but it was easy to stripe alternate rows with a tutorial on the jQuerey site. There seems to be nothing about using divs? The page in question is in development here: http://www.digiflipconcepts.com/digiflip-v3/Rant-and-Rave Can anyone help? thanks -- View this message in context: http://www.nabble.com/how-to-zebra-stripe-divs--tp22048135s27240p22048135.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: how to zebra stripe divs?
I copied it from here: http://blog.jquery.com/2006/10/18/zebra-table-showdown/ and tried unsuccessfully to modify it for div classes ... 2009/2/17 MorningZ morni...@gmail.com I'm just curious... where are you getting your syntax from? div:.postSummary .postSummary-teaser(odd) ?? there's now where in the documentation (http://docs.jquery.com) where that syntax is shown On Feb 16, 6:31 pm, morktron m...@digiflip.tv wrote: Hi I'm just wondering whether it is possible to zebra stripe alternate divs with the same class name? The class name is .postSummary-teaser, I tried this: script type=text/javascript window.onload = function(){ $(div:.postSummary-teaser(odd)).addClass(odd);}; /script but no joy. I'm no Javascript programmer but it was easy to stripe alternate rows with a tutorial on the jQuerey site. There seems to be nothing about using divs? The page in question is in development here: http://www.digiflipconcepts.com/digiflip-v3/Rant-and-Rave Can anyone help? thanks -- View this message in context: http://www.nabble.com/how-to-zebra-stripe-divs--tp22048135s27240p2204... Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: IE Help
Hahaha I understand completely. And cannot tell you how much I appreciate the assistance. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of MorningZ Sent: Monday, February 16, 2009 8:59 PM To: jQuery (English) Subject: [jQuery] Re: IE Help I appreciate the tactful way you said, Hey, dumbass, what the hell is wrong w/ you J it's not that at all... but time and time and time again people on this mailing group don't make it very easy for others to help them out
[jQuery] JQuery: Dynamically added fields values are not submitted
Hi! Kindly visit following link: http://vibersol.com/sitesdemo/shipping/admin/addquotation.php Then add form fields dynamically [by clicking GREEN icon]. And fill these fields. After that submit the form. I checked in FireBug that these values of dynamically added fields are not submitted by form. So values of these dynamically added fields are not submitted to next PHP page. What and where Iam doing wrong ? Thanks in advance
[jQuery] Re: JQuery: Dynamically added fields values are not submitted
First of all if you're using jQuery 1.3.x you need to remove the @ at the start of attribute selectors. ie [...@name='blah'] becomes [name='blah']. Second, technically you can't put a form as a direct child of a table. Instead wrap the table in the form. This is why your stuff isn't getting submitted (at least in Firefox). Karl Rudd On Tue, Feb 17, 2009 at 1:27 PM, Bluesapphire michealg...@gmail.com wrote: Hi! Kindly visit following link: http://vibersol.com/sitesdemo/shipping/admin/addquotation.php Then add form fields dynamically [by clicking GREEN icon]. And fill these fields. After that submit the form. I checked in FireBug that these values of dynamically added fields are not submitted by form. So values of these dynamically added fields are not submitted to next PHP page. What and where Iam doing wrong ? Thanks in advance
[jQuery] Re: jquery context menu plugin: issue with find()
console.log('plugin is disabling option : ' + d[i]); // RETURNS A VALID ANSWER $(this).find('a[href=' + d[i] + ']').parent().addClass('disabled'); // THE SELECTOR RETURNS 0 ELEMENTS, ALTHOUGH THE MARKUP IS CORRECT. Break down the selector there a bit. It seems like the most likely broken spot is the check for an exact match between the href and d[i]. If you switch it to [href~='+d[i]+']' do you still get a match?