[jQuery] Re: JQuery XML parsing is not working in IE?
Yes I tried JSON laterly, and it works so greatly. On Fri, Feb 20, 2009 at 5:30 AM, akzhan akzhan.abdu...@gmail.com wrote: How to reproduce this problem? By the way, Json format is more attractive way for data exchange (Json included into core or additional modules of all known Web server platforms)... On 20 фев, 12:02, Samuel samuel.yh...@gmail.com wrote: Is there any solutions for this? I have a similar problem. I've added mimetype=text/xml in Django's views.py It works well on firefox, opera and chrome, but not working on all IE browsers, and the webkit kerneled browser on adroid. Thanks for your helps. On Sat, Feb 14, 2009 at 9:26 PM, cindy ypu01...@yahoo.com wrote: Hi, all, I have used following code to parse XML file, it works very well for firefox, but not for IE. Can any one told me why and solution ? Thanks! (rXml).find(wired_port).each(function() { var o=new Object(); o.port=$(number,this).text(); o.mac_address=$(mac_addr,this).text(); var enabled=$(enable,this).text(); var interface_status=$(interface_status,this).text(); var link_status=$(link_status,this).text(); if(link_status==1) o.status =Connected; else if(interface_status == 1) o.status = Link Down; else if (enabled== 0) o.status = Disabled; else o.status = Error; var speed=$(speed,this).text(); var auto_neg=$(auto_neg,this).text(); if(auto_neg==1) o.speed=speed+(auto); else o.speed=speed; var duplex=$(duplex,this).text(); if(duplex==0) o.duplex_type=Half; else o.duplex_type=Full; o.fwd_mode=rap_util.formatFwdMode($(fwd_mode,this).text()); o.wired_port_empty=; o.user=$(user_count,this).text(); o.tx_packets=rap_util.formatPackets($(tx_packets,this).text()); o.rx_packets=rap_util.formatPackets($(rx_packets,this).text()); wiredPorts.push(o); }); -- Samuel Wu -- Samuel(吴焱红)
[jQuery] Anyone else getting a False Positive from Norton?
I just started getting phone calls with anyone using Norton due to a false positve any time someone activates any of my jQuery effects as simple as .show() http://www.symantec.com/business/security_response/attacksignatures/detail.jsp?asid=23291 HTTP MSIE7 Uninitialized Memory Code Exec I read a lot about previous issues with FP's on load - but this loads in fine - just triggers when they try to click. Any suggestions?
[jQuery] Re: [validate]
Add a different class to your label then errorClass. Then the plugin won't try to hide. Jörn On Mon, Mar 9, 2009 at 10:21 PM, Trixster joshmda...@gmail.com wrote: I have found a possible bug and a possible solution. When I validate my form select box, its label goes red (gets the error class added) as does the element itself. When I update my selected value, the label disappears altogether. Work around: errorElement: em, If I set errorElement to something other than label I get the expected result (label remains and error class is removed). I decided to have a quick look at your source code and found that the change shown below to the errorsFor function filters out any non- generated labels from being removed. You may have a better solution, if you do please share :). I hope this helps someone else. // *** // Filename: jquery.validate.js // *** Original Code: errorsFor: function(element) { return this.errors().filter([for=' + this.idOrName(element) + ']); }, Suggested Code: errorsFor: function(element) { return this.errors().filter([generated][for=' + this.idOrName (element) + ']); }, // *** // Example validator: // *** jQuery.validator.messages.required = ; $(#criteriaForm).validate({ invalidHandler: function(form, validator) { var errors = validator.numberOfInvalids(); if (errors) { var message = errors == 1 ? 'You missed 1 field. It has been highlighted' : 'You missed ' + errors + ' fields. They have been highlighted'; $(div.errorText span).html(message); $(div.errorText).show(); } else { $(div.errorText).hide(); } }, highlight: function(element, errorClass) { $(element).addClass(errorClass); $(element.form).find(label[for= + element.id + ]) .addClass(errorClass); }, unhighlight: function(element, errorClass) { $(element).removeClass(errorClass); $(element.form).find(label[for= + element.id + ]) .removeClass(errorClass); }, ignoreTitle: true, //errorElement: em, rules: { selMyAnswer: { required: true } } }); // *** // Example HTML: // *** label for=selReviewerConcernsbr /This is the label that gets highlighted when there is nothing selected?/labelbr / select name=selMyAnswer id=selMyAnswer option value= - Specify -/option option value=YYes/option option value=N No/option /select
[jQuery] Re: Shadowbox and JQuery
Hi Jon, you have to load the skin of the shadowbox wich seems not to be included automatically if you build your shadowbox... So go to http://www.mjijackson.com/shadowbox/doc/download.html Download Code and go to shadowbox-2.0-code/src/skin and copy the classic folder to your server. Then modify your Acanthus.js to something like this: Shadowbox.loadSkin('classic', 'path/to/skin/folder'); $(document).ready(function(){ Shadowbox.init(); }); hope this helps! On 10 Mrz., 00:25, Jon cakeordeat...@gmail.com wrote: Can anyone tell me why this isn't working:http://acanthus.sunshine-design.co.uk/projects.htm It's telling me that there's no skin loaded but the shadowboc css is included here:http://acanthus.sunshine-design.co.uk/Css/shadowbox.css Do i need to tell it where the skin is somehow? Or is this a bug?
[jQuery] Re: Get Textbox-value and write to table-cell (td/td)
Sorry guys, just had a couple days off. I will look forward to your answers and reply back here soon. Thanks for concerning, Regards, On Mar 8, 8:22 am, mkmanning michaell...@gmail.com wrote: With the markup example in the OP, use this: var dp = $('#deal-post tbody tr'); dp.find('input[name^=dealAmount]').keyup(function(){ var amount = $(this); $('#deal-summary tbody tr:eq('+dp.index(amount.closest('tr')) +')').find('td.inc-current').text(amount.val()); }); On Mar 7, 4:10 pm, brian bally.z...@gmail.com wrote: On Sat, Mar 7, 2009 at 6:21 PM, Josh Powell seas...@gmail.com wrote: 6 of one... half dozen of another... I don't buy that. I've suggested using an attribute whose purpose is well defined. Making up attributes that aren't represented by the DOCTYPE is a bad idea. Don't get me wrong--I've done it before. Though always to store temporary info. Happily, we have data for that, now. The OP's needs, though, are to identify table cells as being connected to specific text inputs. That's what ID is for.
[jQuery] Re: Bug w/ AjaxSubmit?
Great! Thanks, Knal On Mar 10, 1:03 am, Mike Alsup mal...@gmail.com wrote: I'm using Validate and AjaxSubmit on a form of mine. It's on a long webpage, where you need to scroll to reach the form. For this reason in the action i've added index.php#contact If people w/ JS disabled submit the form, they will be taken back to the form. Only, IE AjaxSubmit seem to freeze on a hash in the action. Any clues? FF AjaxSubmit / Safari AjaxSubmit are just fine. I'm on Windows. It took me a while to figure out it was the hash in the action. Fixed. v2.22 is now available: http://www.malsup.com/jquery/form/#download
[jQuery] need some suggestion about adding active class for one page link
Hi, I am working on the project that will be only one page and the menu will link to the same page. The problem is that i can't add active class to the menu the same we did in the normal linked pages. For example, in css we can see .about .menu ul li .active a { color:#black} . This means the menu will be in black when the user is in the about page. I can't do like this in one page scroll menu as there is only one menu. Are there any ways to let the menu change (add active class)when i scroll to some specific part of the page? Thanks a lot
[jQuery] Combining Fade and Slide
Hi guys, First post, so take it easy on me. I am basically trying to work off of an effect I found at wallpaperscript.net. I am specifically talking about the middle area (General Description, Features and Benefits, etc). Although I was able to take apart the code and apply it to my own site, I still have a problem. When I move to one of the tabs that has more information than the height of the div, the height does not change. Is there a way I can include some jquery slide effect along with the fade so that the div automatically slides and becomes bigger according to the amount of content? If it helps, I posted some code below, which may be of particular interest to you: script type=text/javascript $(#slider_menu).idTabs(function(id,list,set){ $(a,set).fadeTo(fast, 0) .filter([...@href='+id+'],set).fadeTo(fast, 1); for(i in list) $(list[i]).hide(); $(id).fadeIn(); return false; }); /script -- View this message in context: http://www.nabble.com/Combining-Fade-and-Slide-tp22427702s27240p22427702.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Superfish jquery conflict???
Hi, I'm not much more than a jquery cut and paste/change a simple user definition, kinda guy. I can't write javascript... So, I was trying to marry a jquery animation effect with Superfish in one page and apparently have a conflict. The two things work separately but it seems that there is unhappiness having jquery-1.3.2.js and jquery-1.2.6.min.js called in the same HTML page. Superfish scrolls up and seems fine until you hover on a second or third tier menu item. They just act like they're not there and the menu collapses back to tier 1. I tried substituting one or the other jquery versions and each time one or the other animations fails. I'm guessing the other javascripts have issues or dependencies that conflict. All the scripts are: jquery-1.3.2.js jquery.easing.1.3.js jquery.delay.js header.js jquery-1.2.6.min.js hoverIntent.js superfish.js I'm not 100% certain where the conflict lies, but I think that's it. Can there be a jquery conflict? How can I go about resolving it? The demo page is located at: http://ehydrant.com/superfish/marry4.html
[jQuery] Show div in div on mouseover
I have multiple divs on my page in which contains another div with links. These links should be hidden by default but then displayed when the mouse is over the div. HTML-code: div class=box Lorem ipsum div class=linksa href=#Foo/a a href=#bar/a/div /div div class=box Lorem ipsum 2 div class=linksa href=#Foo/a a href=#bar/a/div /div div class=box Lorem ipsum 3 div class=linksa href=#Foo/a a href=#bar/a/div /div
[jQuery] tree view problem
tree is working fine on mozilla and safari , but its not working properly on ie6 or 7
[jQuery] Superfish: Modify
Hello Guys, Just want to inquire how can i modify the height and width of the menu? also how can i change the default text color of the menu? Cheers, Rj
[jQuery] How can I use VAR str into json object
var str = hello; var json = { str: 123 } I know this is not jquery question , but I don't know where I should go The question is how can I use VAR str into json object, I don't want {str: 123}, actually i want {hello: 123} How can solve this problem? In fact this question troubling me a long time Thank you for the answer, any input will help
[jQuery] First jQuery Plugin
Hey guys, first off let me just say Im a jQuery noob, so if you see any obvious errors/improvements, please feel free to inform me! I want to make a simple plugin that auto-populates a html select element, it works fine on the first element but when I call it again to populate a second it appends nothing. Here are my calls in the jQuery UI ajax tab where #product and #new-category are the select elements: $(function(){ $(#product).popSelect(products); $(#new-category).popSelect(categories); }); HTML: select id=product name=product option value=Select Product/option /select select id=new-category name=new-category option value=Select Category /option /select And here is the Plugin: (function($){ jQuery.fn.popSelect = function(table) { return $(this).each(function(){ var obj = $(this); if(this.nodeName.toLowerCase() == 'select'){ $.getJSON(../app/modules/ajax/json.php, { table:table }, function(data) { var options = ''; $.each(data, function(i,item) { options += 'option value=' + item.id + '' + item.title + '/ option'; }); obj.append (options); }); }; }); }; })(jQuery); I also noticed the following: Replacing id='new-category' with id='newwcategory' makes it work!? is there something wrong with -'s in ids? Thanks!
[jQuery] combined url
Hi I'm new to jquery i can't understand what the followng means. var combinedIncludeURL = combine.php?type=javascriptfiles=; can i modified that ? my requirement is can i call jsp instead of this? plz help me
[jQuery] Superfish limit
Hello, I have problem on using superfish. I have googling to fix it but still have no luck. I use superfish on joomla website. It works fine. Except now i want superfish only active for 2 levels of ul. Example: ul li class=parent item3spana href=#Main Link/a/span ul li class=item128a href=#spanLink 1/span/a/ li li class=item18a href=#spanLink 2/span/a ul lia href=#spanSublink2 1/span/a/li lia href=#spanSublink2 2/span/a/li lia href=#spanSublink2 3/span/a/li /ul /li li class=item20a href=#spanLink 3/span/a/ li li class=item21a href=#spanLink 4/span/a/ li li class=item117a target=_blank href=#spanLink5/span/a/li /ul /li /ul I want the superfish dropdown only for second level of 'ul'. So the 'Sublink' show as a standard ul. How can i fix this?
[jQuery] Re: How can I use VAR str into json object
just a wild guess but have you tried this.str? Date: Mon, 9 Mar 2009 22:15:27 -0700 Subject: [jQuery] How can I use VAR str into json object From: gordiany...@gmail.com To: jquery-en@googlegroups.com var str = hello; var json = { str: 123 } I know this is not jquery question , but I don't know where I should go The question is how can I use VAR str into json object, I don't want {str: 123}, actually i want {hello: 123} How can solve this problem? In fact this question troubling me a long time Thank you for the answer, any input will help _ 25GB of FREE Online Storage – Find out more http://clk.atdmt.com/UKM/go/134665320/direct/01/
[jQuery] Re: First jQuery Plugin
i'd avoid arithmetic characters or any reserved characters in your id names. if you must add some kind of spacing character underscores work. it'll also struggle if you begin a class/id with an integer e.g - .1under won't work properly but .el1under will. On Mar 10, 11:08 am, OtakuD ota...@gmail.com wrote: Hey guys, first off let me just say Im a jQuery noob, so if you see any obvious errors/improvements, please feel free to inform me! I want to make a simple plugin that auto-populates a html select element, it works fine on the first element but when I call it again to populate a second it appends nothing. Here are my calls in the jQuery UI ajax tab where #product and #new-category are the select elements: $(function(){ $(#product).popSelect(products); $(#new-category).popSelect(categories); }); HTML: select id=product name=product option value=Select Product/option /select select id=new-category name=new-category option value=Select Category /option /select And here is the Plugin: (function($){ jQuery.fn.popSelect = function(table) { return $(this).each(function(){ var obj = $(this); if(this.nodeName.toLowerCase() == 'select'){ $.getJSON(../app/modules/ajax/json.php, { table:table }, function(data) { var options = ''; $.each(data, function(i,item) { options += 'option value=' + item.id + '' + item.title + '/ option'; }); obj.append (options); }); }; }); }; })(jQuery); I also noticed the following: Replacing id='new-category' with id='newwcategory' makes it work!? is there something wrong with -'s in ids? Thanks!
[jQuery] Re: First jQuery Plugin
Holy moly! Thanks mate! You know, all my ids where new_ but I changed them to new- trying to figure out this error so I thought it didnt work, changing them back now however fixed it all... weird but Im SO grateful! Thanks again!
[jQuery] Re: Show div in div on mouseover
div.box div.links { display:none; } div.box:hover div.links { display:inline; } On Mar 10, 9:13 am, P pst...@gmail.com wrote: I have multiple divs on my page in which contains another div with links. These links should be hidden by default but then displayed when the mouse is over the div. HTML-code: div class=box Lorem ipsum div class=linksa href=#Foo/a a href=#bar/a/div /div div class=box Lorem ipsum 2 div class=linksa href=#Foo/a a href=#bar/a/div /div div class=box Lorem ipsum 3 div class=linksa href=#Foo/a a href=#bar/a/div /div
[jQuery] Re: First jQuery Plugin
Hmm seems like I spoke too soon! (-.-) Well it works fine so long as the three different jQuery UI tabs do not have identically named inputs, or at least thats how it seems. Each of my tabs is used for either editing, creating or deleting a record from the database so identical fields are bound to happen, how can I stop this from occurring and let my 3 tabs act independently of one another?
[jQuery] problems with jquerytableresizer
http://code.google.com/p/jquerytableresizer/ I am trying to use the jquerytableresizer but having some problems. First of all the first column turns different attached is the image http://www.nabble.com/file/p22426241/jquery-resizer.gif and second inside the jquery tabs its behaving very strange ,first time when I scroll any column it automattically scrolls with onmouseover and all other columns cannot be reseized did any body faced this ? please help me ? -- View this message in context: http://www.nabble.com/problems-with---jquerytableresizer-tp22426241s27240p22426241.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] validator on image/link
Hey everyone, Im kinda new with jQuery, so please have a bit patience with me for the propably noobish question. I'm having a few forms, on each form there are 2 options to go to the next one, and on each of the 2 options, i need the validator to activate. The first option is a normal button on the bottom, which if clicked activate the validtor. The other option is through a button in a navigation bar in the top of the screen. This is how one button in the current navigation bar looks like: \a href=input_properties.aspx runat=server onserverclick=btnNext_Click \img src=btn_optioneel_inactive.gif id=btn_optioneel class=active /\/a now it will go to btnnext_click but without the validator. I tried using this: liinput type=image src=btn_optioneel_inactive.gif id=btn_optioneel style=width: 170px; height: 100px class=btn_action runat=server onserverclick=btnNext_Click //li But the funny part is, in IE7, the button is not showed at all. in Firefox it works as it should be though. Imo the easiest solution is someway i can call the validator with the first option. I hope it makes sense, and anyone got an idea. Cheers, Ivar -- View this message in context: http://www.nabble.com/validator-on-image-link-tp22432419s27240p22432419.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] [validate] custom error messages
been bashing my head with this one all day and can't seem to get it to display my custom error messages, any help would be great. $(#offer).validate({ messages: { seasons: { required: 'Please select at least one season', minlength: 'test' } }, rules: { /* Seasons */ seasons: { required: true, minlength: 1 } } });
[jQuery] JQuery expert in Sweden or Scandinavia
I'm looking for a JQuery expert in Sweden or Scandinavia. I'd like him/ her to do a workshop about JQuery for my company. Please contact me for further details. mats.bryn...@avensia.se /Mats
[jQuery] How to prevent refreshing jQuery menu and still have SEO friendly links/pages??
Hi all, So i have created a jQuery menu, but now i am stuck with SEO friendly url's in combo with my jQuery menu refreshing? I don't want my jQuery menu refreshing each time you click on a menu link.
[jQuery] Masked Input Plugin 1.2.2 Released
There is now a new version of my Masked Input Plugin (http:// digitalbush.com/projects/masked-input-plugin/) for jQuery. This is primarily a bugfix release which addresses some edge cases. Additionaly, I made a few changes that I feel make the plugin behave more natural so that the user experience isn't affected too much by using the plugin. A few other things worth noting: This is my first build for this plugin that uses a build script. No longer am I compressing the javascript by hand. I'm hoping to extend the script further so that future releases are easier. Also, I'm now compressing the script with YUI Compressor. This release has been tested with jQuery 1.3.2 and 1.2.6. Bugfixes Fixed bug which blocked apple meta key. This was keeping copy and paste via keyboard shortcut from working on Mac. Fixed bug that caused mask literals to be pushed into the mask placeholder positions when verifying the data. Fixed bug that prevented user input from completing when mask ended in mask literal. Changes Changed behavior on focus to select all text if focusing on a completed mask. No more masking on readonly inputs. Changed escape behavior to put the input back to the original value instead of just blanking the text. Increased range of accepted characters for input. Josh Bush digitalbush.com
[jQuery] How to prevent refreshing jQuery menu and still have SEO friendly links/pages??
Hi all, How do i prevent my jQuery from reloading per page, but still have SEO friendly pages??? any tips, pointers
[jQuery] Re: How can I use VAR str into json object
var str = 'hello'; var json = {}; json[str] = 'wassup'; alert(json.hello); Ask google about dot and square bracket notations for more info. On 10 мар, 08:15, gordiany...@gmail.com gordiany...@gmail.com wrote: var str = hello; var json = { str: 123 } I know this is not jquery question , but I don't know where I should go The question is how can I use VAR str into json object, I don't want {str: 123}, actually i want {hello: 123} How can solve this problem? In fact this question troubling me a long time Thank you for the answer, any input will help
[jQuery] Re: validator on image/link
i found something like this: $(#navigation_button_bar img.inactive).parent().click(function() { $(#goto).val($(this).attr(href)); $(#form_user).submit(); return false; }); Can't i edit this in someway i can call the validator? i tried something but can't get it to work. -- View this message in context: http://www.nabble.com/validator-on-image-link-tp22432419s27240p22434279.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Superfish questions
Hi, everyone. I'm a happy jQuery user, and have been using Superfish for drop-down menus in a Rails project I'm working on. There are two things I'd like to do with Superfish that I don't see in the documentation, and before doing convoluted things (or switching to a different plugin), I wanted to ask if these were possible: (1) I have about five top-level menu options, one of which has four second-level options. I would sometimes like to redirect people to the page such that one of the menus is already selected. That is, if my menu has top-level items A, B, C, D, and E, I would sometimes like to issue a redirect that sends people not only to a page, but to have menu item E open already. I can do this with jQuery UI tabs by using the URL's anchor text to select the current tab; is there a similar facility for Superfish? If not, can anyone suggest another hierarchical menu package that will do this? (2) I currently have all of the menu options loaded at once, each in its own div. Is there any way for Superfish to load menu-related divs dynamically via an Ajax call to the server? Again, jQuery UI tabs do this, and it's a very handy thing to do. Thanks in advance for your help! Reuven
[jQuery] Re: Getting text from a div
I found that : this.$windowTitleBar[0].firstChild.data works On Mar 9, 8:10 pm, RobG rg...@iinet.net.au wrote: On Mar 10, 9:14 am, bawestcott bwestc...@shaw.ca wrote: I am using the jquery windows plugin and i would like to be able to get the title of each window that is created. An example of the html that the plugin creates for the windows title bar is: div class=window-titleBar style=z-index: 103; Click Example5 div class=window-minimizeButton-/div div class=window-maximizeButtonO/div div class=window-closeButtonX/div /div In this case I would like to get the value Click Example 5 from this particular window. I can get the values of all of the divs in windowTitleBar (Click Example5-0X), but I can't figure out how to get the firat value only. Can someone plase help? Where div is a reference to the div you want: div.firstChild.data; -- Rob
[jQuery] table column resizable
None of the available table column resizer worked for me please help me if there is any plugin which works with latest jqeury -- View this message in context: http://www.nabble.com/table-column-resizable-tp22434653s27240p22434653.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: First jQuery Plugin
identical IDs or classes? an id should be unique, a class if for applying to multiple elements. if the tabs have unique ids you can just give all the fields a class based on type and use a selector explicitly naming the parent element $('div#firstTab input.emailAddress').val() would get the value of a text input with a class of emailAddress from the div with the id firstTab. On Mar 10, 11:38 am, OtakuD ota...@gmail.com wrote: Hmm seems like I spoke too soon! (-.-) Well it works fine so long as the three different jQuery UI tabs do not have identically named inputs, or at least thats how it seems. Each of my tabs is used for either editing, creating or deleting a record from the database so identical fields are bound to happen, how can I stop this from occurring and let my 3 tabs act independently of one another?
[jQuery] Re: Show div in div on mouseover
sorry, i forgot to add div.box div.links:hover { display:inline !important; } On Mar 10, 11:27 am, ryan.j ryan.joyce...@googlemail.com wrote: div.box div.links { display:none; } div.box:hover div.links { display:inline; } On Mar 10, 9:13 am, P pst...@gmail.com wrote: I have multiple divs on my page in which contains another div with links. These links should be hidden by default but then displayed when the mouse is over the div. HTML-code: div class=box Lorem ipsum div class=linksa href=#Foo/a a href=#bar/a/div /div div class=box Lorem ipsum 2 div class=linksa href=#Foo/a a href=#bar/a/div /div div class=box Lorem ipsum 3 div class=linksa href=#Foo/a a href=#bar/a/div /div
[jQuery] How do I change the q= parameter?
Hello This is a great script, there's no doubt about that. However, I need to use this script with Drupal, and Drupal already uses a $_GET[q] parameter, and the autocomplete script seems to interfere with that. I've heard that I can change the q= parameter somewhere in the jquery.autocomplete.js file, but I don't know where. I'm using version 1.0.2 of the autocomplete jQuery plugin. Can someone tell me what and where do I have to make changes so that I can put query= instead of q= ? Thanks in advance
[jQuery] Re: First jQuery Plugin
Ok I get that, its an option I can try. What Id like to know though is why the select elements in the currently selected tab arent being populated if the previously selected tab had an element of the same name eg: first tab: select id=new_category name=new_category option value=Select Category/option /select Second Tab: select id=product name=product option value=Select Product/option /select select id=new_category name=new_category option value=Select Category/option /select Thrid Tab: select id=product name=product option value=Select Product/option /select Going from Tab 1 to Tab 2 - product will be populated but not new_category and going from Tab 2 to Tab 3 - product will not be populated... ie if an element with an id equivalent to a previous tab exists in the current tab, it will not be populated and (possibly?) the previous tab element will be although I cant see this since its not loaded. Ive tried fiddling with cache but it doesnt help, specifying the form id as its parent should fix this as you said but why is it necessary, should the tabs be independent? Thanks for any info on this!
[jQuery] Re: How do I change the q= parameter?
around 348 (i'm looking at version 1.0.2) is this snippet data: $.extend({ q: lastWord(term), limit: options.max }, extraParams), changing q right there should work (i just lightly tested doing so and it worked fine) On Mar 10, 10:21 am, Bogdan Craciun craciunb1...@gmail.com wrote: Hello This is a great script, there's no doubt about that. However, I need to use this script with Drupal, and Drupal already uses a $_GET[q] parameter, and the autocomplete script seems to interfere with that. I've heard that I can change the q= parameter somewhere in the jquery.autocomplete.js file, but I don't know where. I'm using version 1.0.2 of the autocomplete jQuery plugin. Can someone tell me what and where do I have to make changes so that I can put query= instead of q= ? Thanks in advance
[jQuery] Re: blur(). not working good enough
Thank you both for posting :) mkmanning, your code works very well! I'm still somewhat of a noob with jQuery syntax, care to explain your code a little more thorough? //The children of the matched element -filtered down to the span element- get hidden, what does the , spn part do exactly? var el = $(this), spn = el.children('span').hide(); //look for the textfield with the wtf class inside the span var edit = el.find('input.wtf'); //check for edit variable (in other words if a textfield was found in the span). If not append one with a type=text attribute to the span if the blur event is fired on the textfield, something happens but you lost me there edit = edit.length0?edit:$('input').attr('type','text').addClass ('wtf').appendTo(el).blur(function() { spn.text($(this).hide().val()).show(); }); //?? edit.val(spn.text()).show()[0].focus(); On Mar 10, 1:15 am, mkmanning michaell...@gmail.com wrote: Typo: last line should be: edit.val(spn.text()).show()[0].focus(); otherwise you'll grab text outside the span. On Mar 9, 5:07 pm, mkmanning michaell...@gmail.com wrote: A couple of notes. Rather than create and then re-create the input and span with every double-click and constantly reattach the blur event, you can just create the input once, and then show/hide the span/input. Here's a suggested refactoring: //turn all titles into textfields $('ul li').dblclick(function(){ var el = $(this), spn = el.children('span').hide(); var edit = el.find('input.wtf'); edit = edit.length0?edit:$('input').attr('type','text').addClass ('wtf').appendTo(el).blur(function(){ spn.text($(this).hide().val()).show(); }); edit.val(el.text()).show()[0].focus(); }); On Mar 9, 5:00 pm, Hector Virgen djvir...@gmail.com wrote: Try focusing the text field right after it is created by calling focus() directly on the element. That's the only way to make sure blur is fired when the user clicks somewhere else. -Hector On Mon, Mar 9, 2009 at 4:18 PM, bart b...@ivwd.nl wrote: Hi all, I've set something up which runs at http://www.vliegendepijl.nl/pages/test/ As you can see it's an unordered list with some list items in it. If you doubleclick the list item the text in it is being replaced by a textfield with the same value in it. This works like it should, no problems. Now what I'd like to have is that as soon as the field is not focussed anymore (blur?) it's should go back to the text in the list item again only then with the updated info (assuming the textfield value has been changed). This is the point where it doesn't behave as I'd like it to. When I doubleclick the first and immediately after that the second they're both left open, so I guess the blur(). method is not completely doing the trick. How can I improve my code so that there can be no more than one textfield open? Safari 3.2.1 (mac os 10.5) gets it right as it is now, the rest of browsers I've tested on all work like I've described. (firefox, opera, camino, chrome, IE)
[jQuery] Re: cancelling default click handler for label/
On Mar 9, 2009, at 3:07 AM, Klaus Hartl wrote: One reason not doing it is probably because IE only supports explicitly associated labels. --Klaus Sure, but that doesn't mean you can't do this: label for =myid input type=checkbox id=myid name=myid / /label Not saying that I prefer this way, just that it's possible. --Karl On 9 Mrz., 04:13, Karl Swedberg k...@englishrules.com wrote: having the input inside the label is perfectly valid. http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1 To associate a label with another control implicitly, the control element must be within the contents of the LABEL element. In this case, the LABEL may only contain one control element. The label itself may be positioned before or after the associated control. I don't prefer doing it this way for my own sites, but it's not incorrect. --Karl Karl Swedbergwww.englishrules.comwww.learningjquery.com On Mar 8, 2009, at 9:49 PM, David Muir wrote: And why is the input within the label? I was under the impression that the correct format is: labelMy Label/labelinput type=checkbox / To have the label select the checkbox: label for=my-checkboxMy Label/labelinput id=my-checkbox type=checkbox / David MorningZ wrote: is there any reason why you couldn't use a span instead of a label ? On Mar 8, 8:57 pm, Bill bllfr...@gmail.com wrote: I have markup that looks like this: div id=phrase:witness%2Bwhereof class=as-s-comp label class=checkbox title=witness whereof input type=checkbox value=witness whereof/ witness whereof /label a class=cl href=#(4104)/a /div When I click anywhere within the label, the checkbox toggles from its previous state. I'd like to cancel this behavior, so that clicking within the label has no effect on the checkbox. How would I use jQuery to accomplish this? Thanks in advance for any help with this. --Bill
[jQuery] Re: cancelling default click handler for label/
On 10 Mrz., 16:00, Karl Swedberg k...@englishrules.com wrote: label for =myid input type=checkbox id=myid name=myid / /label Not saying that I prefer this way, just that it's possible. --Karl Cool. I've never tried that... --Klaus
[jQuery] .append misbehavior in MSIE7 with cross-window element injection
I need to alter a parent window from its pop-up (customers insisted) child, using dynamic data. The following works in Firefox 3, but not in MSIE7. script type=text/javascript var newElement = $(li /).text(Mod State); $(opener.document).find(#injectHere).append(newElement); /script See http://www.5pmstudio.com/js/base.htm (click on the word popup) for a demo. If I were to write out the newElement as just a string, MSIE7 accepts it. If I were to write in an element as a string and then select it out of opener.document and modify its .text, MSIE7 allows for it (just very slowly). But sending a crafted element (as above) outside of the current window fails in one of several ways. (1.3.1 complained of an unsupported interface, 1.3.2 doesn't do anything.) In this particular case, I want to use the .text property of my newly- crafted element because the string data isn't entirely safe to be injecting into the middle of string-built elements, otherwise this really wouldn't be a problem. Thoughts? NNeko
[jQuery] Global Object, Scope question
This is really a javascript question, but will use jQuery. When a page first displays I would like to save a bunch of data about a form. For example the IDs of all of the inputs and how they are originally defined. Depending on user actions I may need to restore individual form fields to their original state. I don't need to reset the entire form. I know how to use jQuery to select the original form elements, but am struggling with how to store them into an object that I can refer to and retrieve individual input data for later. // a global object that stores form data What goes here? How do I make it global and persistent? // a function that resets an field to its original state function resetField(id) { // refers to the global object, but how? } $(document).ready(function(){ // save initial form configuration how called? });
[jQuery] Re: .append misbehavior in MSIE7 with cross-window element injection
What about something like this? $($(opener.document).find(#injectHere)).append(newElement); Date: Tue, 10 Mar 2009 08:32:28 -0700 Subject: [jQuery] .append misbehavior in MSIE7 with cross-window element injection From: nekura.n...@gmail.com To: jquery-en@googlegroups.com I need to alter a parent window from its pop-up (customers insisted) child, using dynamic data. The following works in Firefox 3, but not in MSIE7. script type=text/javascript var newElement = $(li /).text(Mod State); $(opener.document).find(#injectHere).append(newElement); /script See http://www.5pmstudio.com/js/base.htm (click on the word popup) for a demo. If I were to write out the newElement as just a string, MSIE7 accepts it. If I were to write in an element as a string and then select it out of opener.document and modify its .text, MSIE7 allows for it (just very slowly). But sending a crafted element (as above) outside of the current window fails in one of several ways. (1.3.1 complained of an unsupported interface, 1.3.2 doesn't do anything.) In this particular case, I want to use the .text property of my newly- crafted element because the string data isn't entirely safe to be injecting into the middle of string-built elements, otherwise this really wouldn't be a problem. Thoughts? NNeko _ Free photo editing software from Windows Live . Try it now! http://clk.atdmt.com/UKM/go/134665240/direct/01/
[jQuery] [tooltip] tooltip container flowing off page in Safari 4, not resizing as should
Hi there, In my implementation of the tooltip plugin, I have notice that in Safari 4 the tooltip does not resize when the cursor moves against the window. That is, I have track set to true as default, so initially the tooltip formats so that it does not overflow over the side of the window, but then as the mouse moves it will maintain the same height and width, forcing a scrollbar when moused over in the direction of the window. Im not sure if this is just a little bug that needs to be fixed for the plugin, or something wrong with my implementation. Here is the page in question. Hover over the image in the article body (in Safari 4) to see what I mean. http://www.pomona.edu/dev/web44.asp Thanks,
[jQuery] Re: Global Object, Scope question
simply saying var ThisVar = whatever; makes it global so in your code, it would be like script type=text/javascript var FormData = {}; $(document).ready(function(){ $(:input).each(function() { FormData[this.id] = $(this).val(); }); }); function resetField(id) { if (FormData[id] != null) { $(# + id).val(FormData[id]); } } /script On Mar 10, 11:38 am, Brad nrmlcrpt...@gmail.com wrote: This is really a javascript question, but will use jQuery. When a page first displays I would like to save a bunch of data about a form. For example the IDs of all of the inputs and how they are originally defined. Depending on user actions I may need to restore individual form fields to their original state. I don't need to reset the entire form. I know how to use jQuery to select the original form elements, but am struggling with how to store them into an object that I can refer to and retrieve individual input data for later. // a global object that stores form data What goes here? How do I make it global and persistent? // a function that resets an field to its original state function resetField(id) { // refers to the global object, but how? } $(document).ready(function(){ // save initial form configuration how called? });
[jQuery] Re: .append misbehavior in MSIE7 with cross-window element injection
Same behavior -- which is a No such interface supported exeception on this WinXP/IE7.0.5730.13 machine. The $(newElement).appendTo($ (opener.document).find(#injectHere)) permutation also behaves in this way. On Mar 10, 8:48 am, Joseph Le Brech jlebr...@hotmail.com wrote: What about something like this? $($(opener.document).find(#injectHere)).append(newElement); Date: Tue, 10 Mar 2009 08:32:28 -0700 Subject: [jQuery] .append misbehavior in MSIE7 with cross-window element injection From: nekura.n...@gmail.com To: jquery-en@googlegroups.com I need to alter a parent window from its pop-up (customers insisted) child, using dynamic data. The following works in Firefox 3, but not in MSIE7. script type=text/javascript var newElement = $(li /).text(Mod State); $(opener.document).find(#injectHere).append(newElement); /script Seehttp://www.5pmstudio.com/js/base.htm(click on the word popup) for a demo. If I were to write out the newElement as just a string, MSIE7 accepts it. If I were to write in an element as a string and then select it out of opener.document and modify its .text, MSIE7 allows for it (just very slowly). But sending a crafted element (as above) outside of the current window fails in one of several ways. (1.3.1 complained of an unsupported interface, 1.3.2 doesn't do anything.) In this particular case, I want to use the .text property of my newly- crafted element because the string data isn't entirely safe to be injecting into the middle of string-built elements, otherwise this really wouldn't be a problem. Thoughts? NNeko _ Free photo editing software from Windows Live . Try it now!http://clk.atdmt.com/UKM/go/134665240/direct/01/- Hide quoted text - - Show quoted text -
[jQuery] Re: Global Object, Scope question
Thanks. All of my attempts were trying to overly complicate things. On Mar 10, 9:52 am, MorningZ morni...@gmail.com wrote: simply saying var ThisVar = whatever; makes it global so in your code, it would be like script type=text/javascript var FormData = {}; $(document).ready(function(){ $(:input).each(function() { FormData[this.id] = $(this).val(); }); }); function resetField(id) { if (FormData[id] != null) { $(# + id).val(FormData[id]); }} /script On Mar 10, 11:38 am, Brad nrmlcrpt...@gmail.com wrote: This is really a javascript question, but will use jQuery. When a page first displays I would like to save a bunch of data about a form. For example the IDs of all of the inputs and how they are originally defined. Depending on user actions I may need to restore individual form fields to their original state. I don't need to reset the entire form. I know how to use jQuery to select the original form elements, but am struggling with how to store them into an object that I can refer to and retrieve individual input data for later. // a global object that stores form data What goes here? How do I make it global and persistent? // a function that resets an field to its original state function resetField(id) { // refers to the global object, but how? } $(document).ready(function(){ // save initial form configuration how called? });
[jQuery] metadata plugin within jquery core
hello I was wondering why the metadata plugin is not included with the core? thank you for your attention -- Massimiliano Balestrieri
[jQuery] Re: blur(). not working good enough
'el' and 'spn' variables are both so we can cache the jQuery object and save having to do the traversal again later in the function; this is generally a good practice from a performance perspective. The 'spn' variable chains the hide() method to the selector, since the selector still returns the jQuery object; this gets us the span element and hides it at the same time. We then use the find() method on variable 'el' (which is the li element) to get the input with a class of '.wtf' and assign it to the 'edit' variable. If this is the first time a user has double-clicked the li, then the result of that selector will be an empty jQuery object (which will then have a length of 0; the jQuery object is array-like). We check for that with a ternary statement, assigning the result to the 'edit' variable: if we found the input, then we just assign 'edit' to itself, since that's the input, or if we don't find the input we: 1. create it using $('input') //note the , that tells jQuery to create an element 2. we assign attributes to it with .attr() //in this case the type attribute of text 3. we add the 'wtf' class with .addClass() 4. we append the element to the 'el' variable (the LI in the DOM), using appendTo() //we use appendTo as it allows us to retain the input element and continue chaining jQuery methods 5. we chain the blur() method for handling the onblur event, passing an anonymous function to it. As this function is bound to the input we created, the keyword 'this' inside the function refers to that input. We use the 'spn' variable (the cached SPAN), adding the .text() method and passing it the value of the input. As with hiding the span originally, we can hide the input and get its text value at the same time by wrapping it with $() as $(this).hide().val(). (If we had just wanted the value, we could have simply said 'this.value' without having to resort to jQuery). We then chain the show() method to the 'spn' to make it visible again. Steps 1-5 above are just to create the input and assign the onblur event handler and callback. The last part of the dblcick function assigns the text of the SPAN to the input's value, calls the show() method (if we just created the input it will already be visible when we append it to the LI, so show will just be a no-op, doing nothing). In order to ensure that the input is focused, we access the actual element with [0], the first (and only) element in the jQuery object (remember it's array-like, so you can access its members with [n] notation), and then call the focus () method on it. Note that the latter is different than the jQuery focus() method, which attaches an onfocus() event handler, whereas .focus() on the input element itself simply focuses it (same for blur()) Hope that's all clear :) On Mar 10, 7:54 am, bart b...@ivwd.nl wrote: Thank you both for posting :) mkmanning, your code works very well! I'm still somewhat of a noob with jQuery syntax, care to explain your code a little more thorough? //The children of the matched element -filtered down to the span element- get hidden, what does the , spn part do exactly? var el = $(this), spn = el.children('span').hide(); //look for the textfield with the wtf class inside the span var edit = el.find('input.wtf'); //check for edit variable (in other words if a textfield was found in the span). If not append one with a type=text attribute to the span if the blur event is fired on the textfield, something happens but you lost me there edit = edit.length0?edit:$('input').attr('type','text').addClass ('wtf').appendTo(el).blur(function() { spn.text($(this).hide().val()).show(); }); //?? edit.val(spn.text()).show()[0].focus(); On Mar 10, 1:15 am, mkmanning michaell...@gmail.com wrote: Typo: last line should be: edit.val(spn.text()).show()[0].focus(); otherwise you'll grab text outside the span. On Mar 9, 5:07 pm, mkmanning michaell...@gmail.com wrote: A couple of notes. Rather than create and then re-create the input and span with every double-click and constantly reattach the blur event, you can just create the input once, and then show/hide the span/input. Here's a suggested refactoring: //turn all titles into textfields $('ul li').dblclick(function(){ var el = $(this), spn = el.children('span').hide(); var edit = el.find('input.wtf'); edit = edit.length0?edit:$('input').attr('type','text').addClass ('wtf').appendTo(el).blur(function(){ spn.text($(this).hide().val()).show(); }); edit.val(el.text()).show()[0].focus(); }); On Mar 9, 5:00 pm, Hector Virgen djvir...@gmail.com wrote: Try focusing the text field right after it is created by calling focus() directly on the element. That's the only way to make sure blur is fired when the user clicks somewhere else. -Hector On Mon, Mar 9, 2009 at 4:18 PM, bart b...@ivwd.nl wrote: Hi
[jQuery] Does anyone know of a plugin that allows you to use offset with a right position value instead of left.
Hello all, I am trying to use a slider that when clicked slides out to the left. I cant use offset to position my element, because the slider will slide to the right, owing to the left position element. I have tried to use absolute positioning, but due when the page is resized my layout is lost. It has caused a lot of frustration, so if anyone could help it would be great Martin
[jQuery] Re: Does anyone know of a plugin that allows you to use offset with a right position value instead of left.
put a div around everything, give it a maximum width and position:relative; this will trap your absolute positioned elements. Martin wrote: Hello all, I am trying to use a slider that when clicked slides out to the left. I cant use offset to position my element, because the slider will slide to the right, owing to the left position element. I have tried to use absolute positioning, but due when the page is resized my layout is lost. It has caused a lot of frustration, so if anyone could help it would be great Martin
[jQuery] Re: Getting text from a div
That would be the same as RobG's: div.firstChild.data; where this.$windowTitleBar[0] = the containing div (although it's unclear how you'r getting this.$windowTitleBar[0]) $('.window-titleBar')[0] will get the element from the jQuery selector. Using .firstChild.data on that will work but is dependent upon your markup, as I said previously. Consider this change in markup: div class=window-titleBar style=z-index: 103; div class=window-minimizeButton-/div div class=window-maximizeButtonO/div div class=window-closeButtonX/div Click Example5 /div If the child divs are absolutely positioned, then this will render the same, but the text node is no longer the firstChild and so .firstChild.data won't work. On Mar 10, 6:40 am, bawestcott bwestc...@shaw.ca wrote: I found that : this.$windowTitleBar[0].firstChild.data works On Mar 9, 8:10 pm, RobG rg...@iinet.net.au wrote: On Mar 10, 9:14 am, bawestcott bwestc...@shaw.ca wrote: I am using the jquery windows plugin and i would like to be able to get the title of each window that is created. An example of the html that the plugin creates for the windows title bar is: div class=window-titleBar style=z-index: 103; Click Example5 div class=window-minimizeButton-/div div class=window-maximizeButtonO/div div class=window-closeButtonX/div /div In this case I would like to get the value Click Example 5 from this particular window. I can get the values of all of the divs in windowTitleBar (Click Example5-0X), but I can't figure out how to get the firat value only. Can someone plase help? Where div is a reference to the div you want: div.firstChild.data; -- Rob
[jQuery] Re: Troubles with animate in IE (possible bug)
I dont know exactly whats wrong in your code, but u can do much simplier code, like this: $(document).ready(function() { //hide all div.body $('div.show_wrapper div.body').hide(); $('a.show_link').click(function() { //element to slide Up or Down var $bodyTarget = $(this).parent().parent().parent().find('div.body'); //Look if the document has div.body visible var $bodyVisible = $('div.body:visible'); //if bodyTarget is diferent than the bodyVisible, slideUp the bodyVisible if ( $bodyTarget[0] != $bodyVisible[0] ) $('div.body:visible').slideUp(); //slide down or up the bodyTarget $bodyTarget.slideToggle(); return false; }); }); In the css set width for the div.body to width:870px; then u have smoother animation withouth jumping Test in firefox 3, IE6, IE7, Chrome, Safari, Opera. On Mon, Mar 9, 2009 at 16:52, emmj...@gmail.com emmj...@gmail.com wrote: Alright so I'm trying to build a custom accordion type functionality, now it works fine in Firefox, Chrome and Safari but IE is throwing me an error. An example of the functionality can bee seen at: http://www.rememberwhencruisers.com/ My javascript can be found at : http://www.rememberwhencruisers.com/js/site.js And I'm using the google hosted jquery at: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js Now IE keeps telling me Invalid Argument in the jquery library at line 4166 character 5, which is the following code. fx.elem.style[ fx.prop ] = fx.now + fx.unit; The line that is causing this error in my javascript is the following: parent.animate({ height: targetSize }); Is this a bug or is there something wrong with my code?
[jQuery] Re: Troubles with animate in IE (possible bug)
Ops, change this: $('div.body:visible').slideUp(); to $bodyVisible.slideUp(); because u already have the element to slideUp in the var :D On Tue, Mar 10, 2009 at 13:51, Leonardo K leo...@gmail.com wrote: I dont know exactly whats wrong in your code, but u can do much simplier code, like this: $(document).ready(function() { //hide all div.body $('div.show_wrapper div.body').hide(); $('a.show_link').click(function() { //element to slide Up or Down var $bodyTarget = $(this).parent().parent().parent().find('div.body'); //Look if the document has div.body visible var $bodyVisible = $('div.body:visible'); //if bodyTarget is diferent than the bodyVisible, slideUp the bodyVisible if ( $bodyTarget[0] != $bodyVisible[0] ) $('div.body:visible').slideUp(); //slide down or up the bodyTarget $bodyTarget.slideToggle(); return false; }); }); In the css set width for the div.body to width:870px; then u have smoother animation withouth jumping Test in firefox 3, IE6, IE7, Chrome, Safari, Opera. On Mon, Mar 9, 2009 at 16:52, emmj...@gmail.com emmj...@gmail.com wrote: Alright so I'm trying to build a custom accordion type functionality, now it works fine in Firefox, Chrome and Safari but IE is throwing me an error. An example of the functionality can bee seen at: http://www.rememberwhencruisers.com/ My javascript can be found at : http://www.rememberwhencruisers.com/js/site.js And I'm using the google hosted jquery at: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js Now IE keeps telling me Invalid Argument in the jquery library at line 4166 character 5, which is the following code. fx.elem.style[ fx.prop ] = fx.now + fx.unit; The line that is causing this error in my javascript is the following: parent.animate({ height: targetSize }); Is this a bug or is there something wrong with my code?
[jQuery] Re: Anyone else getting a False Positive from Norton?
Users completing a new update from Norton no longer have the problem - guess you can ignore this one. On Mar 10, 12:48 am, PawPrint sc...@pawprint.net wrote: I just started getting phone calls with anyone using Norton due to a false positve any time someone activates any of my jQuery effects as simple as .show() http://www.symantec.com/business/security_response/attacksignatures/d... HTTP MSIE7 Uninitialized Memory Code Exec I read a lot about previous issues with FP's on load - but this loads in fine - just triggers when they try to click. Any suggestions?
[jQuery] Re: Does anyone know of a plugin that allows you to use offset with a right position value instead of left.
Thanks that worked perfectly. On Mar 10, 4:48 pm, Liam Potter radioactiv...@gmail.com wrote: put a div around everything, give it a maximum width and position:relative; this will trap your absolute positioned elements. Martin wrote: Hello all, I am trying to use a slider that when clicked slides out to the left. I cant use offset to position my element, because the slider will slide to the right, owing to the left position element. I have tried to use absolute positioning, but due when the page is resized my layout is lost. It has caused a lot of frustration, so if anyone could help it would be great Martin- Hide quoted text - - Show quoted text -
[jQuery] making variable in [tooltip] plugin available to Shadowbox
Hi there, I am using the tooltip plugin successfully, though I have run into a problem in that I have another plugin, Shadowbox, that needs to access the title attributes that tooltip if blasting away. Is there any way to make the tooltip variable 'tooltipText' global such that I can call it from my Shadowbox plugin as well? Conceptually speaking, how can this be approached. Any recommendations on how to accomplish this? Thanks, Here is the page in question: http://www.pomona.edu/dev/web44.asp
[jQuery] Superfish Menu Dropdown Not Working In Firefox
www.omegaboxing.com As shown through Internet Explorer, the navbar works flawlessly. However, when viewing through Firefox, the dropdown menu tends to go behind the content section. How can I fix this?
[jQuery] jQuery Menu
I'm currently working on a jQuery menu that loads content via ajax in a div. The menu tree menu with three levels. This is the code that manages the top level click events: $categories.click(function(){ for (i = 0; $categories.length; i++) { switch(this.id){ case topLevel_ + i: $(this).attr(id,topLevel_+ i +_active); // Change ID to allow toggling $categories.removeClass('active'), $(this).addClass('active'); $categories.not(this).hide(350); // Hide all other categories $(#leftCol #midLevel_ + i).slideDown(normal); // Show sub- categories return false; break; case topLevel_+ i +_active: $(this).removeClass('active'); $(#leftCol #midLevel_ + i).slideUp(normal); // Hide Second Level $categories.show(350); // Redisplay all First Levels $(this).attr(id,topLevel_ + i); //Reset ID return false; break; default: //hide loading bar if there is no selected section hideLoading(); break; } } }); The code managing the second and third level is similar. This all works great, but when I add this snippet: $(a).toggle( function(){ showLoading(); fade(); content.load(this.href).fadeIn(500); hideLoading(); return false; }, function(){ showLoading(); fade(); content.load(base.asp).fadeIn(500); hideLoading(); return false; }); The tree starts to act weird. When I click on the top level of the tree, the second level doesn't hide. Any ideas?
[jQuery] SimpleModal error in IE7
Hi! I\'m using your great plugin, but I have a problem with IE7. The problem comes after closing de simplemodal, I then have to click twice in the button to open it again, because the first time there\'s the js error, wich says: \nodeType\ is null or not a object... It only happens with IE... what can I do? Thank you very much in advance! Ricardo
[jQuery] filter(fn)
Hi Experts, I am trying to do something like this; $(form#submit).submit(function(){ var name = $('#name').attr('value'); var $out = $(#message); //Send the request $.ajax({ type: POST, url: post.php, data: oname=+name, complete: function(data){ $out.html(data.responseText); if(($out).filter(':contains(Invalid)')) { $out.fadeIn(); $(.txtHint:visible).slideDown(slow); $(.client).hide(); }else if($out).filter(':contains(successfull)')){ $out.fadeIn(); } to be able to determine what to hide and display depending on the result recieved from the query. This doesnt not behave as exoected - do any know exactkly what i am doing wrong here?
[jQuery] Superfish Menu not working in Firefox
www.omegaboxing.com In Internet Explorer, it works flawlessly as the navbar. However, in Firefox, the submenus tend to roll behind the content box. What's the best way to fix this?
[jQuery] Re: [Listnav] Extra characters
Hello Jack, Thanks for the reply. It seems it's not allowed to use characters with accents as class names. So I have ln-á LIs but the plugin cannot select them. A workaround could be to group accented characters with normal ones, like every a and á results could be on the same list. Is it possible to do it somehow? Thanks On Mar 9, 10:29 pm, Jack Killpatrick j...@ihwy.com wrote: Hi, The letters array does double-duty: it's used to create the nav strip and it's also used to add a class to each LI in your list, based on the first text character inside your list item. An exception is the '_', which is added to LI's that start with a number. So, for example, after listnav is applied you'll have LI's like: li class='anythingYouHadBefore ln-a'a href=something.htmlAn item that starts with 'a'/a/li (notice the ln-a class) I'm not familiar enough with non-english languages to know if letters like the ones you're adding can be used as css class names. If they are, it seems like it would work by adding those letters to the letters array. If they're not, we'd have to think out a workaround. - Jack jdg wrote: I would like to use some extra characters for the first letter like á, é or ő. I can extend the letters array with those chars but when i click them on the interface it shows the full list of LIs instead of the chars i expect. I'm using the newest version (2.0) with jquery 1.2.6. Could u give me some hint how to solve this? Thanks.
[jQuery] Reset individual form objects to their original display state
I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: filter(fn)
Hard to tell, since you haven't said what it is doing or what you're expecting it to do, but I think data should be {oname:name} Maybe that's what's wrong ? You'll also need a return false to prevent the standard form submit from kicking in brightdad...@googlemail.com wrote: Hi Experts, I am trying to do something like this; $(form#submit).submit(function(){ var name = $('#name').attr('value'); var $out = $(#message); //Send the request $.ajax({ type: POST, url: post.php, data: oname=+name, complete: function(data){ $out.html(data.responseText); if(($out).filter(':contains(Invalid)')) { $out.fadeIn(); $(.txtHint:visible).slideDown(slow); $(.client).hide(); }else if($out).filter(':contains(successfull)')){ $out.fadeIn(); } to be able to determine what to hide and display depending on the result recieved from the query. This doesnt not behave as exoected - do any know exactkly what i am doing wrong here? No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.9/1993 - Release Date: 03/10/09 07:19:00
[jQuery] Re: Reset individual form objects to their original display state
I'm thinking that $(form input).each(function() { $(this).val(origFormData[$(this).attr (id)]); }); should step over each input field in a form and conjure up values from the origFormData object based on the id of the current element conjuring a value. But the state-saving code should be more along the lines of $(:input).each(function(){ origFormData[$(this).attr(id)] = $(this).val (); // Might not work with checkboxen }); to get the value of the field and keep the origFormData based on the ID of the field. Hope it helps! NNeko On Mar 10, 10:36 am, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: Reset individual form objects to their original display state
You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: How to prevent refreshing jQuery menu and still have SEO friendly links/pages??
You can keep a sitemap with the whole structure, but ideally you shouldn't use AJAX to load whole pages in place of links. Reloading different pages is not bad. On Mar 10, 10:20 am, 123gotoandplay wesweatyous...@gmail.com wrote: Hi all, How do i prevent my jQuery from reloading per page, but still have SEO friendly pages??? any tips, pointers
[jQuery] Re: custom error messages
It looks okay. If you remove all your messages, does your default messages display? If not, something else is the issue. On Mar 10, 2:51 am, Jaggi jaggi_2...@hotmail.com wrote: been bashing my head with this one all day and can't seem to get it to display my custom error messages, any help would be great. $(#offer).validate({ messages: { seasons: { required: 'Please select at least one season', minlength: 'test' } }, rules: { /* Seasons */ seasons: { required: true, minlength: 1 } } });
[jQuery] Re: Reset individual form objects to their original display state
Rather than create a global object, why not just take advantage of the jQuery data method and store the original value with its corresponding form element: $(:input).each(function(){ $(this).data('origVal',this.value) }); On Mar 10, 11:02 am, MorningZ morni...@gmail.com wrote: You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: Reset individual form objects to their original display state
Thanks for the help on the other question. I missed the part about reverting the value. Actually I don't think that I need to explicitly store the value. If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling ... $(origFormData['age']).val() ..., but I need to explain my requirement in more detail. Restoring the input field's value is only one part of the problem. There are a number of other attributes that might need to be restored. Depending on how the backend code originally displays the form, a field can start out enabled or disabled. It can start out with a special class assignment. These attributes can dynamically change as the form is used. Therefore resetting a field may involve more than restoring the field's original value. What I was hoping I could do was store an jQuery object that contained all of the information about the field and somehow (magically) use that to overwrite the current representation of that same field. Am I dreaming? Thinking of other ways to solve this problem, is there a way with jQuery to get the full html of an input element? The .html() method doesn't do it. On Mar 10, 12:02 pm, MorningZ morni...@gmail.com wrote: You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: Shadowbox and JQuery
Hey BB, Thanks so much! What was puzzling me was the way the skin path is formed. For anyone else who is having issues with this, the first parameter in the loadSkin method is the folder name of your skin and the second is the path from the root to your skin folder but NOT including your skin folder. Phew, cheers bud! On Mar 10, 8:50 am, BB buchholz.bast...@googlemail.com wrote: Hi Jon, you have to load the skin of the shadowbox wich seems not to be included automatically if you build your shadowbox... So go tohttp://www.mjijackson.com/shadowbox/doc/download.htmlDownload Code and go to shadowbox-2.0-code/src/skin and copy the classic folder to your server. Then modify your Acanthus.js to something like this: Shadowbox.loadSkin('classic', 'path/to/skin/folder'); $(document).ready(function(){ Shadowbox.init(); }); hope this helps! On 10 Mrz., 00:25, Jon cakeordeat...@gmail.com wrote: Can anyone tell me why this isn't working:http://acanthus.sunshine-design.co.uk/projects.htm It's telling me that there's no skin loaded but the shadowboc css is included here:http://acanthus.sunshine-design.co.uk/Css/shadowbox.css Do i need to tell it where the skin is somehow? Or is this a bug?
[jQuery] Re: Reset individual form objects to their original display state
Reading up on the documentation would be a good thing, as knowing the basics, like knowing what .html() does, is absolutely required if you want to learn to use this library to the fullest As for If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling .. No, that's not what is going to happen saying: origFormData[some key] = $(this); saves a pointer to that object, not a copy to the object itself. so if later on you change anything on $(this), you changed the value (but is really just a pointer to the object) of origFormData[some key] as well On Mar 10, 2:43 pm, Brad nrmlcrpt...@gmail.com wrote: Thanks for the help on the other question. I missed the part about reverting the value. Actually I don't think that I need to explicitly store the value. If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling ... $(origFormData['age']).val() ..., but I need to explain my requirement in more detail. Restoring the input field's value is only one part of the problem. There are a number of other attributes that might need to be restored. Depending on how the backend code originally displays the form, a field can start out enabled or disabled. It can start out with a special class assignment. These attributes can dynamically change as the form is used. Therefore resetting a field may involve more than restoring the field's original value. What I was hoping I could do was store an jQuery object that contained all of the information about the field and somehow (magically) use that to overwrite the current representation of that same field. Am I dreaming? Thinking of other ways to solve this problem, is there a way with jQuery to get the full html of an input element? The .html() method doesn't do it. On Mar 10, 12:02 pm, MorningZ morni...@gmail.com wrote: You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: how to change direction of sub-indicator arrow in superfish
yeah, i figured that out later. turns out i had done it once before, on an older site, just forgotten how. thanks for the followup, --cz On Feb 17, 1:00 pm, Fontzter dmfo...@gmail.com wrote: You need to alter the image file arrows-ff.png so that the arrows are pointing the opposite direction. On Feb 17, 10:31 am, seezee debbil...@gmail.com wrote: near as i can tell, this is handled in the javascript, not the style sheet. i've modified my style sheet for the horizontal menu so sub- menus fly-out to the left, and moved the indicator arrows to the left of the text, as well. i'd like the sub-indicators to point left (the top level-indicators can continue to point down). how do i do this? thanks, --cz
[jQuery] Re: Shadowbox and JQuery
Hey BB, Thanks so much! What was puzzling me was the way the skin path is formed. For anyone else who is having issues with this, the first parameter in the loadSkin method is the folder name of your skin and the second is the path from the root to your skin folder but NOT including your skin folder. Phew, cheers bud! On Mar 10, 8:50 am, BB buchholz.bast...@googlemail.com wrote: Hi Jon, you have to load the skin of the shadowbox wich seems not to be included automatically if you build your shadowbox... So go tohttp://www.mjijackson.com/shadowbox/doc/download.htmlDownload Code and go to shadowbox-2.0-code/src/skin and copy the classic folder to your server. Then modify your Acanthus.js to something like this: Shadowbox.loadSkin('classic', 'path/to/skin/folder'); $(document).ready(function(){ Shadowbox.init(); }); hope this helps! On 10 Mrz., 00:25, Jon cakeordeat...@gmail.com wrote: Can anyone tell me why this isn't working:http://acanthus.sunshine-design.co.uk/projects.htm It's telling me that there's no skin loaded but the shadowboc css is included here:http://acanthus.sunshine-design.co.uk/Css/shadowbox.css Do i need to tell it where the skin is somehow? Or is this a bug?
[jQuery] Re: Reset individual form objects to their original display state
Haven't tried it but you could use my getAttributes plugin (http:// plugins.jquery.com/project/getAttributes) to store the current attributes in the data as I suggested, and then retrieve it later. That would get you not only the value but all other attributes. $(document).ready(function(){ $(:input).each(function(){ $(this).data('orig',$.getAttributes($(this))) }); //to access original attributes of the input later, including value console.log( $('some_input').data('orig').value ); console.log( $('some_input').data('orig').name); }); On Mar 10, 11:43 am, Brad nrmlcrpt...@gmail.com wrote: Thanks for the help on the other question. I missed the part about reverting the value. Actually I don't think that I need to explicitly store the value. If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling ... $(origFormData['age']).val() ..., but I need to explain my requirement in more detail. Restoring the input field's value is only one part of the problem. There are a number of other attributes that might need to be restored. Depending on how the backend code originally displays the form, a field can start out enabled or disabled. It can start out with a special class assignment. These attributes can dynamically change as the form is used. Therefore resetting a field may involve more than restoring the field's original value. What I was hoping I could do was store an jQuery object that contained all of the information about the field and somehow (magically) use that to overwrite the current representation of that same field. Am I dreaming? Thinking of other ways to solve this problem, is there a way with jQuery to get the full html of an input element? The .html() method doesn't do it. On Mar 10, 12:02 pm, MorningZ morni...@gmail.com wrote: You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: Global Object, Scope question
On Mar 10, 10:38 am, Brad nrmlcrpt...@gmail.com wrote: When a page first displays I would like to save a bunch of data about a form. For example the IDs of all of the inputs and how they are originally defined. Depending on user actions I may need to restore individual form fields to their original state. You don't need a global container to store this, as form inputs already keep their default state as properties of the object itself. For example, function resetInput(obj) { if (obj.type==text) { obj.value=obj.defaultValue; } else if (obj.type==checkbox) { obj.checked = obj.defaultChecked; } ... } Matt Kruse
[jQuery] Re: filter(fn)
if(($out).filter(':contains(Invalid)')) That is always going to be true since it returns a jQuery object regardless of whether there are any matched elements. Try this instead: if(($out).filter(':contains(Invalid)').length) --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Mar 10, 2009, at 11:32 AM, brightdad...@googlemail.com wrote: Hi Experts, I am trying to do something like this; $(form#submit).submit(function(){ var name = $('#name').attr('value'); var $out = $(#message); //Send the request $.ajax({ type: POST, url: post.php, data: oname=+name, complete: function(data){ $out.html(data.responseText); if(($out).filter(':contains(Invalid)')) { $out.fadeIn(); $(.txtHint:visible).slideDown(slow); $(.client).hide(); }else if($out).filter(':contains(successfull)')){ $out.fadeIn(); } to be able to determine what to hide and display depending on the result recieved from the query. This doesnt not behave as exoected - do any know exactkly what i am doing wrong here?
[jQuery] Re: Reset individual form objects to their original display state
Form elements have defaultValue and defaultSelected attributes. You might want to explore using those to reset the elements. http://www.irt.org/script/909.htm Karl Rudd On Wed, Mar 11, 2009 at 5:58 AM, mkmanning michaell...@gmail.com wrote: Haven't tried it but you could use my getAttributes plugin (http:// plugins.jquery.com/project/getAttributes) to store the current attributes in the data as I suggested, and then retrieve it later. That would get you not only the value but all other attributes. $(document).ready(function(){ $(:input).each(function(){ $(this).data('orig',$.getAttributes($(this))) }); //to access original attributes of the input later, including value console.log( $('some_input').data('orig').value ); console.log( $('some_input').data('orig').name); }); On Mar 10, 11:43 am, Brad nrmlcrpt...@gmail.com wrote: Thanks for the help on the other question. I missed the part about reverting the value. Actually I don't think that I need to explicitly store the value. If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling ... $(origFormData['age']).val() ..., but I need to explain my requirement in more detail. Restoring the input field's value is only one part of the problem. There are a number of other attributes that might need to be restored. Depending on how the backend code originally displays the form, a field can start out enabled or disabled. It can start out with a special class assignment. These attributes can dynamically change as the form is used. Therefore resetting a field may involve more than restoring the field's original value. What I was hoping I could do was store an jQuery object that contained all of the information about the field and somehow (magically) use that to overwrite the current representation of that same field. Am I dreaming? Thinking of other ways to solve this problem, is there a way with jQuery to get the full html of an input element? The .html() method doesn't do it. On Mar 10, 12:02 pm, MorningZ morni...@gmail.com wrote: You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: Reset individual form objects to their original display state
Thanks for pointing out about that $(this) is pointer. On Mar 10, 12:50 pm, MorningZ morni...@gmail.com wrote: Reading up on the documentation would be a good thing, as knowing the basics, like knowing what .html() does, is absolutely required if you want to learn to use this library to the fullest As for If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling .. No, that's not what is going to happen saying: origFormData[some key] = $(this); saves a pointer to that object, not a copy to the object itself. so if later on you change anything on $(this), you changed the value (but is really just a pointer to the object) of origFormData[some key] as well On Mar 10, 2:43 pm, Brad nrmlcrpt...@gmail.com wrote: Thanks for the help on the other question. I missed the part about reverting the value. Actually I don't think that I need to explicitly store the value. If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling ... $(origFormData['age']).val() ..., but I need to explain my requirement in more detail. Restoring the input field's value is only one part of the problem. There are a number of other attributes that might need to be restored. Depending on how the backend code originally displays the form, a field can start out enabled or disabled. It can start out with a special class assignment. These attributes can dynamically change as the form is used. Therefore resetting a field may involve more than restoring the field's original value. What I was hoping I could do was store an jQuery object that contained all of the information about the field and somehow (magically) use that to overwrite the current representation of that same field. Am I dreaming? Thinking of other ways to solve this problem, is there a way with jQuery to get the full html of an input element? The .html() method doesn't do it. On Mar 10, 12:02 pm, MorningZ morni...@gmail.com wrote: You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: Reset individual form objects to their original display state
I'll have a look. It sounds like this is the basis for what I need. Thanks. On Mar 10, 12:58 pm, mkmanning michaell...@gmail.com wrote: Haven't tried it but you could use my getAttributes plugin (http:// plugins.jquery.com/project/getAttributes) to store the current attributes in the data as I suggested, and then retrieve it later. That would get you not only the value but all other attributes. $(document).ready(function(){ $(:input).each(function(){ $(this).data('orig',$.getAttributes($(this))) }); //to access original attributes of the input later, including value console.log( $('some_input').data('orig').value ); console.log( $('some_input').data('orig').name); }); On Mar 10, 11:43 am, Brad nrmlcrpt...@gmail.com wrote: Thanks for the help on the other question. I missed the part about reverting the value. Actually I don't think that I need to explicitly store the value. If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling ... $(origFormData['age']).val() ..., but I need to explain my requirement in more detail. Restoring the input field's value is only one part of the problem. There are a number of other attributes that might need to be restored. Depending on how the backend code originally displays the form, a field can start out enabled or disabled. It can start out with a special class assignment. These attributes can dynamically change as the form is used. Therefore resetting a field may involve more than restoring the field's original value. What I was hoping I could do was store an jQuery object that contained all of the information about the field and somehow (magically) use that to overwrite the current representation of that same field. Am I dreaming? Thinking of other ways to solve this problem, is there a way with jQuery to get the full html of an input element? The .html() method doesn't do it. On Mar 10, 12:02 pm, MorningZ morni...@gmail.com wrote: You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Superfish integration into Joomla 1.5
Hello, I try to integrate Superfish menu into Joomla 1.5. But no luck. : ( Perhaps I don't understand the principles. Maybe someone can help? I made some articles and made menu (using mainmenu mod from joomla). No CSS, just default. Downloaded and installed superfish mod for joomla 1.5. Enabled it, disabled main menu - no luck. Menu looks like default. I've chosen nav- bar style - also no luck - menu unchanged. Made google search - all info is about enabling superfish in page header. It's enabled in modules. Do I have to manually enter some code for enabling superfish? Where? In documentation - it's written - You have to have a WORKING drop down meniu. So, it means - superfish just adds some features (as animation and so on)??? If I just need a nav- bar style menu, I can make it simply with css and I don't need superfish? Can someone explain me where I'm wrong or how to enable superfish? Thank You beforehand.
[jQuery] [treeview] Node click behavior
Is there a way to make a node in the treeview expand/collapse ONLY if the +/- is clicked but not the folder icon or folder name but still make the node selectable?
[jQuery] Open a Pop Up Window Using jQuery
Hi, How Could I open a open a pop window using jQuery? ~.Nil
[jQuery] Cluetip: deactivate a tip
How do I deactivate or unbind a cluetip associated with an element? In the demo, togglable clueTip still invokes the onActivate function. I don't want any other processing to happen. Want to get rid of the hover over event processing for the element. Thanks in advance Abhi
[jQuery] Does the ready event wait for JavaScript files to be downloaded?
I am working on a Web app that will consist of virtually empty html pages to be downloaded with references in the head tag to JS files that will be used to dynamically construct the elements of the page. I have read that the ready event waits until the DOM is loaded and manipulable. Would this mean waiting until all of the JS includes have been downloaded? Thanks.
[jQuery] Superfish Menus Not Appearing In IE6
I realize that this is a common issue, but I can't seem to track down the problem with my site. I have installed the Superfish plugin, and of course, it works like a champ for all browser except for IE6. I installed the bgiframe plugin with the hope that the background images in my portal application might be suppressing the drop-downs, but unfortunately, that didn't do the trick. Could someone offer up some guidance on what I need to do to get this working properly? My site can be found at http://www.brethrenchurch.org/web/brethren/about-us Thanks! Josh
[jQuery] Re: bassistance.de Jörn's Enhancement
Attached, the files needed to execute this version. Please let me know what do you think about it! On Mon, Mar 9, 2009 at 13:45, Tyron tyr...@gmail.com wrote: Hello everybody, I made some updates on the script, mainly to include the resources below: - default formatResult unformats the result, keeping it text-only; - option bool selectButton: chooses whether the arrow for options is displayed or not; - option integer width: now resizes the input and div to match the size specified, even if the arrow part is displayed; - JQuery showDiv(): shows the result's div even if the input is not clicked (used by the arrow to display the results); - boolean menuClicked(): returns whether the click in the screen was in the result's div or not. The best part, in my opinion, is the second item. With this option set to true, the autocompleter can simulate a select box, and it seems very nice. Also, with the width option, it is not needed to create a new class for each instance of the input in the page. I am trying to make it the more generic possible, in order to reuse it many times in each page, and keeping it simple. If anybody wants the code, or have new ideas that would like to share with me, let me know! Best regards, Tyron. jquery.autocomplete.js Description: JavaScript source .ac_results { margin-top: 1px; /*all*/ margin-left: -2px !important; /*all*/ _margin-left:-4px !important; /*ie8*/ _margin-left:-2px;/*ie6*/ _margin-top: -2px !important; /*ieX*/ padding: 0px; border: 1px solid black; background-color: white; overflow: hidden; z-index: 1000; } .ac_results ul { width: 100%; list-style-position: outside; list-style: none; padding: 0; margin: 0; } .ac_results li { margin: 0px; padding: 2px 5px; cursor: default; display: block; /* if width will be 100% horizontal scrollbar will apear when scroll mode will be used */ /*width: 100%;*/ font: menu; font-size: 12px; /* it is very important, if line-height not setted or setted in relative units scroll will be broken in firefox */ line-height: 16px; overflow: hidden; } .ac_loading { background: white url('../images/indicator.gif') right center no-repeat; } .ac_odd { background-color: #eee; } .ac_over { background-color: #0A246A; color: white; } .ac_conteiner { position: relative; float: left; border: 1px solid #a8a8a8; color : #333; font-size : 13px; font-weight : bold; /*margin-bottom: 15px;*/ height: 20px; /*width: 350px; */ background-color : #e9e9e9; } .ac_input { position: absolute; top:0; left:0; float: left; text-indent:2px; font-size:1em; font-family:sans-serif; padding:1px; border: 0 !important; height: 16px; margin: 1px; /*width: 328px; /* ac_conteiner - ac_img - this.margin - this.padding */ background-color: #FFF; } .ac_img { width: 18px; height: 20px; float:right; background: url('../images/arrow.gif'); background-repeat: no-repeat; background-position: right center; } .ac_img:hover { background-color : #d9d9d9; } .ac_img:active { background-color : #c9c9c9; }attachment: arrow.gifattachment: indicator.gif
[jQuery] Re: How to turn a bulleted list into a pseudo select box
No one has input on this? I know I've seen it done somewhere, I just can't remember where. On Mar 10, 11:30 am, Andy Matthews amatth...@dealerskins.com wrote: I have a bulleted list that I'd like to convert into a pseudo select box. The result would be appear to be a select box, but would merely expand the list container and display the list within. Does anyone have something like this? Andy Matthews Senior Web Developer www.dealerskins.com P Please consider the environment before printing this e-mail. Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at aw...@dealerskins.com. winmail.dat 97KViewDownload
[jQuery] Re: First jQuery Plugin
Hyphens are perfectly valid in IDs: HTML 4 spec section 6.2 says, ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens (-), underscores (_), colons (:), and periods (.). XHTML spec section C.8 says, Note that the collection of legal values in XML 1.0 Section 2.3, production 5 is much larger than that permitted to be used in the ID and NAME types defined in HTML 4. When defining fragment identifiers to be backward-compatible, only strings matching the pattern [A-Za-z][A-Za-z0-9:_.-]* should be used. See Section 6.2 of [HTML4] for more information. On Mar 10, 7:37 am, OtakuD ota...@gmail.com wrote: Ok I get that, its an option I can try. What Id like to know though is why the select elements in the currently selected tab arent being populated if the previously selected tab had an element of the same name eg: first tab: select id=new_category name=new_category option value=Select Category/option /select Second Tab: select id=product name=product option value=Select Product/option /select select id=new_category name=new_category option value=Select Category/option /select Thrid Tab: select id=product name=product option value=Select Product/option /select Going from Tab 1 to Tab 2 - product will be populated but not new_category and going from Tab 2 to Tab 3 - product will not be populated... ie if an element with an id equivalent to a previous tab exists in the current tab, it will not be populated and (possibly?) the previous tab element will be although I cant see this since its not loaded. Ive tried fiddling with cache but it doesnt help, specifying the form id as its parent should fix this as you said but why is it necessary, should the tabs be independent? Thanks for any info on this!
[jQuery] li width bug in jCarousel
In jcarousel 0.2.3, in the reload() funtion, on line 269, there is this code to compute the dimensions of the li's: $('li', this.list).each(function(i) { ... but won't that compute the dimensions of all li's in the document? It should only be recomputing the dimensions of the child li's and so should be something like: var li = this.list.children('li'); $(li, this.list).each(function(i) { ... Is that right or am I missing something?
[jQuery] Re: making variable in [tooltip] plugin available to Shadowbox
Hi roryreiff, maybe you store the title-attribut from the current element in a variable and add it when the tooltip hides. If this doesn't work try to set the title in the rel-attribut: rel=shadowbox;title='Hallo' On 10 Mrz., 18:25, roryreiff roryre...@gmail.com wrote: Hi there, I am using the tooltip plugin successfully, though I have run into a problem in that I have another plugin, Shadowbox, that needs to access the title attributes that tooltip if blasting away. Is there any way to make the tooltip variable 'tooltipText' global such that I can call it from my Shadowbox plugin as well? Conceptually speaking, how can this be approached. Any recommendations on how to accomplish this? Thanks, Here is the page in question:http://www.pomona.edu/dev/web44.asp
[jQuery] Re: How to turn a bulleted list into a pseudo select box
Andy, can you explain what you're looking for in a different way? I've read it a few times and am not sure what you're looking for. Thx, Jack Andy Matthews wrote: No one has input on this? I know I've seen it done somewhere, I just can't remember where. On Mar 10, 11:30 am, Andy Matthews amatth...@dealerskins.com wrote: I have a bulleted list that I'd like to convert into a pseudo select box. The result would be appear to be a select box, but would merely expand the list container and display the list within. Does anyone have something like this? Andy Matthews Senior Web Developer www.dealerskins.com P Please consider the environment before printing this e-mail. Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at aw...@dealerskins.com. winmail.dat 97KViewDownload
[jQuery] jcarousel + cycle
Hey guys, i'm using Cycle, to display some images, and i wanted the pager to be a carousel so that as we add more things we aren't constrained by the width of the page. That part in general wasn't that hard. The trick is making the carousel scroll based on the active slide for cycle. I was reading the callback functions, but i'm not sure i know how to invoke it the right way. Basically, when the last visible slide becomes active, i want the carousel to advance. And when it gets to the end, to flip back to the front (easy with wrap:last) Here's a paste of what i've got for my jquery code. http://rafb.net/p/sRqmP789.html Thanks.
[jQuery] Re: Open a Pop Up Window Using jQuery
is there any compelling reason to *not* use window.open, which any jQuery solution will ultimately use anyways? or are you looking for a modal div (which blockUI can do, jqModal can do, jQuery UI can do, etc) On Mar 10, 2:46 pm, .Nil nileshd.kulka...@gmail.com wrote: Hi, How Could I open a open a pop window using jQuery? ~.Nil
[jQuery] Undefined function
I have been having trouble trying to define a function. I've tried every idea I have come across on the internet but nothing worked. I hope some one here has an of how to get it defined properly. The code that is not defined is: var currentUl = 1; function showMe(n) { $(ul#gallery).click(function(){ $(#+currentUl).hide(); $(#+n).show(); $(div#picture).show(); $(span#picture).show(); $(img#space).hide(); }); currentUl = n; }; This basic setup has worked for me in the past with just pure javascript. The html I am using to call it is: onclick=showMe('3'); I am referencing the function with an: id=1 I would appreciate any help you can offer. Thanks a lot
[jQuery] Re: Reset individual form objects to their original display state
mkmanning's plugin, along with his recommendation to use jQuery's data method instead of a global object, will work nicely. To answer my other question re: getting the full html of an element, there is this plugin: http://plugins.jquery.com/project/outerhtml. On Mar 10, 1:16 pm, Brad nrmlcrpt...@gmail.com wrote: I'll have a look. It sounds like this is the basis for what I need. Thanks. On Mar 10, 12:58 pm, mkmanning michaell...@gmail.com wrote: Haven't tried it but you could use my getAttributes plugin (http:// plugins.jquery.com/project/getAttributes) to store the current attributes in the data as I suggested, and then retrieve it later. That would get you not only the value but all other attributes. $(document).ready(function(){ $(:input).each(function(){ $(this).data('orig',$.getAttributes($(this))) }); //to access original attributes of the input later, including value console.log( $('some_input').data('orig').value ); console.log( $('some_input').data('orig').name); }); On Mar 10, 11:43 am, Brad nrmlcrpt...@gmail.com wrote: Thanks for the help on the other question. I missed the part about reverting the value. Actually I don't think that I need to explicitly store the value. If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling ... $(origFormData['age']).val() ..., but I need to explain my requirement in more detail. Restoring the input field's value is only one part of the problem. There are a number of other attributes that might need to be restored. Depending on how the backend code originally displays the form, a field can start out enabled or disabled. It can start out with a special class assignment. These attributes can dynamically change as the form is used. Therefore resetting a field may involve more than restoring the field's original value. What I was hoping I could do was store an jQuery object that contained all of the information about the field and somehow (magically) use that to overwrite the current representation of that same field. Am I dreaming? Thinking of other ways to solve this problem, is there a way with jQuery to get the full html of an input element? The .html() method doesn't do it. On Mar 10, 12:02 pm, MorningZ morni...@gmail.com wrote: You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: Reset individual form objects to their original display state
How about just clone-ing the form node and replace the current form with the clone when you want to 'reset' it? On Mar 10, 5:31 pm, Brad nrmlcrpt...@gmail.com wrote: mkmanning's plugin, along with his recommendation to use jQuery's data method instead of a global object, will work nicely. To answer my other question re: getting the full html of an element, there is this plugin:http://plugins.jquery.com/project/outerhtml. On Mar 10, 1:16 pm, Brad nrmlcrpt...@gmail.com wrote: I'll have a look. It sounds like this is the basis for what I need. Thanks. On Mar 10, 12:58 pm, mkmanning michaell...@gmail.com wrote: Haven't tried it but you could use my getAttributes plugin (http:// plugins.jquery.com/project/getAttributes) to store the current attributes in the data as I suggested, and then retrieve it later. That would get you not only the value but all other attributes. $(document).ready(function(){ $(:input).each(function(){ $(this).data('orig',$.getAttributes($(this))) }); //to access original attributes of the input later, including value console.log( $('some_input').data('orig').value ); console.log( $('some_input').data('orig').name); }); On Mar 10, 11:43 am, Brad nrmlcrpt...@gmail.com wrote: Thanks for the help on the other question. I missed the part about reverting the value. Actually I don't think that I need to explicitly store the value. If I store the value of $(this) as shown I can later retrieve the value for a specific field by e.g., calling ... $(origFormData['age']).val() ..., but I need to explain my requirement in more detail. Restoring the input field's value is only one part of the problem. There are a number of other attributes that might need to be restored. Depending on how the backend code originally displays the form, a field can start out enabled or disabled. It can start out with a special class assignment. These attributes can dynamically change as the form is used. Therefore resetting a field may involve more than restoring the field's original value. What I was hoping I could do was store an jQuery object that contained all of the information about the field and somehow (magically) use that to overwrite the current representation of that same field. Am I dreaming? Thinking of other ways to solve this problem, is there a way with jQuery to get the full html of an input element? The .html() method doesn't do it. On Mar 10, 12:02 pm, MorningZ morni...@gmail.com wrote: You forgot an important part of the line origFormData[this.name] = $(this); and this is you need to store the value, so origFormData[this.name] = $(this).val(); and on your other topic, the code was also provided to revert the value back to the saved value On Mar 10, 1:36 pm, Brad nrmlcrpt...@gmail.com wrote: I have a need to reset individual form objects to their original state. When the document loads I save the element like this: var origFormData = {}; $(document).ready(function(){ // Save original form data for each input field $(:input).each(function(){ origFormData[this.name] = $(this); }); }); For example I have a form with fields named name, age, and dept selectable by $(#name), $(#age), and $(#dept) respectably. How would I go about later restoring/resetting a specific field. Is there a simple way to overwrite the object represented by $(#name) with origFormData.name?
[jQuery] Re: How to turn a bulleted list into a pseudo select box
Howzabout I show you what I'm thinking of. This is what I came up with. It does pretty much everything I wanted: http://commadelimited.com/uploads/hover/ It's not perfect, but it's meant to fill a gap in our software. Currently we only have Flash navigation on our dealer sites. A crawler would never be able to index our navigation. Now that we're using the newest version of SWFObject, which allows for alternate content in the Flash container, we're dumping a text version of our nav into the container. Then, I'm going to style and script it using jQuery. The thrust of this is mostly for mobile devices, most of which don't currently support Flash, but DO support Javascript and CSS. Finally, if they don't even have JS, then they just get a bulleted list. andy _ From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jack Killpatrick Sent: Tuesday, March 10, 2009 4:00 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to turn a bulleted list into a pseudo select box Andy, can you explain what you're looking for in a different way? I've read it a few times and am not sure what you're looking for. Thx, Jack Andy Matthews wrote: No one has input on this? I know I've seen it done somewhere, I just can't remember where. On Mar 10, 11:30 am, Andy Matthews mailto:amatth...@dealerskins.com amatth...@dealerskins.com wrote: I have a bulleted list that I'd like to convert into a pseudo select box. The result would be appear to be a select box, but would merely expand the list container and display the list within. Does anyone have something like this? Andy Matthews Senior Web Developer www.dealerskins.com P Please consider the environment before printing this e-mail. Total customer satisfaction is my number 1 priority! If you are not completely satisfied with the service I have provided, please let me know right away so I can correct the problem, or notify my manager Aaron West at aw...@dealerskins.com. winmail.dat 97KViewDownload