[jQuery] Re: hoverIntent conflicts in IE browsers ( superfish fly-out )
Hi Brian, thanks for the reply. While trying to make a sample page that shows only flyout menu so that I can show you, I got more finding. Whether with v1.3.2 or v1.2.6 with hoverIntent, the flyout behaves like other browsers in all three IEs. The site that is showing issue, is a Magento site that has Prototype/ scriptaculous scripts, which the conflict has ironed out long time ago, but I am still believing it's a number of combinations that resulting this problem with hoverIntent and I need to do further testing. I can't post the site, but if you want to take a look, let me know, I will send you the url offlist. Here are the results I am seeing: jQuery v1.32 + Superfish v1.4.8 + hoverIntent, fly-out is gone in IE6. Fly-out menu cannot be revisited in IE 7 and IE8 unless a refresh has preformed. jQuery v1.2.6 + Superfish v1.4.8 + hoverIntent, fly-out cannot be revisited unless a refresh has preformed - this problem occurs in all three IEs. jQuery v1.3.2 + Superfish v1.4.8, fly-out works fine in all IEs. jQuery v1.2.6+ Superfish v1.4.8, fly-out works fine in all IEs. With above scripts combination with a sample page that shows nothing else but superfish menu, the fly-out works in all IEs. On May 26, 9:05 am, Brian Cherne wrote: > Can you send me a sample of the code that breaks? > > Thanks, > Brian. > > On Tue, May 26, 2009 at 2:48 AM, sutra wrote: > > > More finding on this issue. Turns out it may not be the issue with > > jQuey v1.3.2 but the > > hoverIntent script. > > > With hoverIntent, using v1.3.2 the flyout is gone. Using hoverIntent > > with v1.2.6 the flyout shows however further testing shows that, once > > a flyout menu has been viewed (without clicking on anything), it won't > > show up again unless I refresh the page, this is happening in IE6, IE7 > > and IE8. I removed the hoverIntent for further testing, the problem > > gone in all IE browsers. I then changed back to v1.3.2, everything > > seems to be working now. > > > On May 25, 12:27 am, sutra wrote: > > > I hope this post is appropriate, because this is the only way I could > > > contact the author who wrote the script. > > > > quote: "If you need help with the jQuery/JavaScript aspect of the > > > plugin, post a message to the General jQuery Google Group with the > > > word “Superfish” " > > > > Thanks.
[jQuery] Detect version of internet explorer using jquery
how to Detect version of internet explorer using jquery?? & also name of browser?
[jQuery] Re: Where to find a proper slide effect?
No, any suggestion is much appreciated, I did ask "where to find or how to make", but all they were telling me is that the effect already exists, they didn't even see the difference between them... Anyway, I've already tried to make this work with animate() and, so far, failed... so I just asked for a little help. I've replaced minified jquery with normal one now... I didn't think anyone will actually look at the code there, I made it just as an illustration of what's different in those effects :)
[jQuery] Re: does selectors $ cache?
I don't think it does.. If you did $('div#myid') then it would search through all the div's.. Here's a bit on jquery performance that I read about.. http://www.artzstudio.com/2009/04/jquery-performance-rules/ Hope that helps... On May 26, 10:44 pm, jonathan wrote: > does selectors cache? for example, if I do $('#myid') twice, does it > search through the document twice for myid?
[jQuery] does selectors $ cache?
does selectors cache? for example, if I do $('#myid') twice, does it search through the document twice for myid?
[jQuery] Re: Code Review: slideshow plugin using JSON
I just moved so I know how it is. I'll be sure to ping you again soon. I'm still trying to get our company to spin up the dev blog so we can make the release.. so no one seems to be in a rush. Thanks for your time! Stefan On May 26, 11:27 pm, chris thatcher wrote: > totally behind schedule as I'm in the process of moving. please remind me > if I don't get back to you this week some time. apologies. > > > > On Thu, May 21, 2009 at 3:02 PM, Stefan Hayden wrote: > > > You have to love the public domain. > > > Thanks again and I look forward to your feedback. > > > Stefan > > > On May 21, 2:49 pm, chris thatcher > > wrote: > > > nice work stefan, i checked out the example and will look under the > > covers > > > sometime tonight. I'm actually at the library of congress (i work here) > > so > > > it was great to see those images from our prints and photographs > > division. > > > > On Thu, May 21, 2009 at 12:01 PM, Stefan Hayden > > wrote: > > > > > I was looking for a jQuery slideshow that worked the way I wanted and > > > > didn't find one. I figured you can never have too many slideshow > > > > plugins so I've tried to make my first jQuery plugin and was hoping > > > > people with a bit more jQuery experience could look it over and give > > > > some suggestions before I go around telling people about it. > > > > > This slideshow requires the first slide to be in the HTML and then it > > > > preloads the next image in the rotation just before showing it making > > > > the initial page load time faster. It also has previous/next and > > > > pagination interfaces and well as an option to show a animated > > > > caption. > > > > > plugin homepage:http://stefanhayden.com/shermanstravel_slideshow/ > > > > plugin source: > > > >http://stefanhayden.com/shermanstravel_slideshow/jquery.ShermansTrave. > > .. > > > > > any feedback would be welcome. > > > > > Stefan Hayden > > > > -- > > > Christopher Thatcher > > -- > Christopher Thatcher
[jQuery] performance of html(val)
I am constructing a large table on the fly and add it to the dom using html(val). It takes about 6 seconds. I am wondering if there's any practice that would speed up this process? thanks!
[jQuery] Re: Code Review: slideshow plugin using JSON
totally behind schedule as I'm in the process of moving. please remind me if I don't get back to you this week some time. apologies. On Thu, May 21, 2009 at 3:02 PM, Stefan Hayden wrote: > > You have to love the public domain. > > Thanks again and I look forward to your feedback. > > Stefan > > On May 21, 2:49 pm, chris thatcher > wrote: > > nice work stefan, i checked out the example and will look under the > covers > > sometime tonight. I'm actually at the library of congress (i work here) > so > > it was great to see those images from our prints and photographs > division. > > > > > > > > On Thu, May 21, 2009 at 12:01 PM, Stefan Hayden > wrote: > > > > > I was looking for a jQuery slideshow that worked the way I wanted and > > > didn't find one. I figured you can never have too many slideshow > > > plugins so I've tried to make my first jQuery plugin and was hoping > > > people with a bit more jQuery experience could look it over and give > > > some suggestions before I go around telling people about it. > > > > > This slideshow requires the first slide to be in the HTML and then it > > > preloads the next image in the rotation just before showing it making > > > the initial page load time faster. It also has previous/next and > > > pagination interfaces and well as an option to show a animated > > > caption. > > > > > plugin homepage:http://stefanhayden.com/shermanstravel_slideshow/ > > > plugin source: > > >http://stefanhayden.com/shermanstravel_slideshow/jquery.ShermansTrave. > .. > > > > > any feedback would be welcome. > > > > > Stefan Hayden > > > > -- > > Christopher Thatcher > -- Christopher Thatcher
[jQuery] Re: Superfish with multicolumn sub navigation
Hi Charlie, I guess the next question is what happens if there are li items within the div? Superfish does not display the grand child menu items when hovering over the parent. I.E. Parent1 Parent2 Child1 Grandchild1 I mean, how do I display the child and grand child when a user hovers over a top level parent menu item? Thanks mate (and thank you for your patience :)), Charles On May 26, 8:20 pm, Charlie wrote: > simple recipe for multi column subs withsuperfish > put div into 2nd level . Put whatever you want inside this div, images, > multiple divs, heading tags etc. Style divs any way you need > use supersubs.js to adjust widths if not all sub menu's are same width > Hetneo wrote:Hi Mohammad, You're exactly right. That's is the functionality > of thesuperfishextension for Joomla. I found this tutorial very > helpful:http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-with-jquery/In > this case > however,superfish(http://users.tpg.com.au/j_birch/plugins/superfish/) is far > advanced than that tutorial and I am looking to extend the functionality of > the tutorial intosuperfish. Say for example you have three levels of menu > menu-level-1, menu- level-2, menu-level-3. When you hover over menu-level-1, > I wantsuperfishto display both menu-level-2 and menu-level-3 levels for all > menu items on levels two and three. I had hoped someone had achived this to > save me some time :). Any ideas? Many thanks, Charles On May 26, 5:16 pm, > "Mohd.Tareq"wrote:Hi Hetneo, Its easy to get that kind > of menu using javascript / jquery code. See they have written plugin based on > ul & li. Now here is a solution like Ischa I guess ;) Step : 1 - Create Main > menu div menu1,menu2,menu3,etc 2 - Create another menu below each menu > div [menu1 -> sub-menu1] 3 - Use 'hover' function of jquery or 'onmouseover / > onmouseout' of javascript 3 - Within 'hover' or 'onmouseover/onmouseout' > function you need to hide / unhide your divs 4 - Use any function like > fadeIn,fadeOut,slideUp,slideUp to toggle your menu. > Or you can do it via css like twitter people did. cheers, > On Tue, May 26, 2009 at 12:15 PM, Ischa > Gastwrote:That's great news. Would be interested to see > the final product.Are there any hints you can give me or point me to a file I > can be focusing my attention to achive this?It's a custom made script where > you can choose what child you want to target, somethingsuperfishdoesn't have > but would be very welcome.---| Regard |--- Mohammad.Tareque
[jQuery] Re: Using a selector recursively
I am using it after an ajax request. I think it might be a bug, that probably will get fixed in 1.3.3. Did you test in Safari, FF, or IE? I am searching through the bug tracker right now. On May 21, 5:31 pm, aquaone wrote: > It works fine for me. Does your actual script block contain a > $(document).ready(function(){ ... }); ? > > On Thu, May 21, 2009 at 16:49, sean wrote: > > > I forgot the '#' sign in the sample code I provided. > > > The problem I am having is that the code does not work. For some > > reason, If i remove the tags, it works, but keeping them in > > makes it not work.
[jQuery] Re: unable to create validator that prevents transition to next field on errors. [ $(this).focus() this.focus() both fail ]
Well.. I found a workable solution, and I have a theory as to why it works...The theory might be whack because my javascript and DOM knowledge is fair to middling at best.. But here goes (comments and corrections most welcome, maybe I'll learn something additional...) Theory and Explanation > The reason why this doesn't work is because there is no way you can stop a > field transition from occurring. You can return false from the event handler, you can try callingevent.stopPropagation (); and event.preventDefault();No matter... You are going to transition to the next field. The only way you can go back to the offending field to force the user to correct the bad input is to set the focus after the field transition has occured. This is what I do in my solution. I set the name of the bad field when i detect it in the onChange handler.. But it is only in the onFocus() event handler of the next field that i actually force the focus to go back. A colleague of mine who is way better than me at Javascript tells me he has seen this before and uses the trick of setting a timer to go back after 10 ms or so. Same basic idea anyway... here is the code that shows the solution >>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> jQuery | Example // is document ready? $(document).ready(function() { var nameOfElementWithMostRecentInvalidInput = null $('#checked').change(function(evento) { alert ('piano this works.. mon foo zee target' + evento.target); var element = $(this); alert ("name is " + element.name) if (this.value == "dog") { alert("no dogs allowed"); /* THE FOLLOWING LINES SEEM TO DO NOTHING... $('#checked').focus(); $('#checked').select(); $('#checked').focus(); evento.stopPropagation(); evento.preventDefault(); evento.target.focus(); */ alert ('target is ' + evento.target) nameOfElementWithMostRecentInvalidInput = evento.target.name alert ('setting to ' + nameOfElementWithMostRecentInvalidInput ) return false; } if (this.value == "cat") { alert("no cats allowed"); $(this).focus(); $(this).select(); return false; } return true; }); $('#back').focus(function(evento) { if (nameOfElementWithMostRecentInvalidInput != null) { var saveName = nameOfElementWithMostRecentInvalidInput; nameOfElementWithMostRecentInvalidInput = null alert ('nameo is ' + saveName); $('*[name=' + saveName + ']').focus(); } }); }); ...animal: ...color: ...type: chris -- Chris Bedford Founder & Lead Lackey Build Lackey Labs http://buildlackey.com
[jQuery] Re: input field name include "." jquery cann't parse
On May 27, 6:21 am, MorningZ wrote: > So if you had: > > > > how would you apply a style to that? Using a class or a selector other than the id. > > can't say: > > #user.name { > } > > because that would look for > > > > yeah, "poor choice" sure is relative, but why make things more > difficult, when a simple dash or underscore would do the same thing > (and not cause issues with basic CSS or jQuery) The choice is clear - the OP can simply stop using jQuery selectors for those elements, or stop using jQuery (or any other CSS selector- based framework) at all. Given that it's an ID, the OP could use: $(document.getElementById('user.name'))... Which is likely faster anyway. There is conflict between what is allowed as a value of the ID attribute and what CSS can use to select elements by ID. It remains an issue for anyone wishing to select elements using CSS selectors, regardless of the context. It is also an issue with the W3C Selectors API, a specification to which John Resig (and many others) contributed, yet there is nothing within that specification to address the issue raised in this thread. Clearly they don't think it's worth addressing. The jQuery documentation does, after all, refer to them as "weird" and "special" characters. -- Rob
[jQuery] jQuery Ajax grid
Hello, We are starting a new ASP.NET MVC application and want to use an jQuery Ajax grid. I came across following options: - jqGrid (better than Flexigrid because it supports editable cells) - Flexigrid (looks better than jqGrid) - tablesorter - Ingrid - jqGridView - OTHERS? Which is the best choice for jQuery Ajax grid ? Which is the most popular jQuery grid/table ? Thank You.
[jQuery] select range of code and wrap, multiple times
Hi folks, I hope you can help me out, I have a bit of html that looks something like: div --h1 --h2 --p --p --h2 --ul --h2 --p And am trying to figure out a way to grab from that code each h2 and its siblings, up-to-but-stopping-at the next h2, for example, I want to grab from the simplified tree above: h2,p,p; then h2,ul; then 2,p and wrap each group in a div so that the final result looks like div --h1 --div h2 p p --div h2 ul --div h2 p I hope what I need is clear and that you fine folks can help me out!
[jQuery] expandoPane
Hey Guys, Just wondering if anyone knows how I can an effect like dojox expandoPane using jQuery. http://api.dojotoolkit.org/jsdoc/1.3/dojox.layout.ExpandoPane . I'm sure it must be possible, but I'm not that familiar with jQuery yet. Thanks in advance.
[jQuery] Re: IE8 Does Not Work
It works in IE8. What errors are you getting? Need more details. On May 26, 1:44 pm, rickmataka wrote: > I was wondering if there was an update for validate plugin because it > does not work in IE8 > and even though i do server side thats sucks > > Thanks > Rick
[jQuery] Re: number of checked boxes
Or... you could use a shorter selector var checked = $(':checkbox:checked').length; -Mensagem Original- De: Macsig Para: jQuery (English) Thanks for your help. I appreciate it On May 26, 2:44 pm, James wrote: > var checked = $("input[type=checkbox]:checked").length; > > if (checked >= 1) { > // do something > > }
[jQuery] Re: Textarea value with javascript
I've never used fckEditor before, but how about try using Firebug to walk through the HTML to locate the parts created by fckEditor and see how you can reference it. I found it very useful for referencing parts of the DOM created by other plug-ins or scripts I'm not familiar with. On May 26, 4:01 am, "saa...@gmail.com" wrote: > Yeah > > On 26 maijs, 16:53, Caires Vinicius wrote: > > > You tried the innerHTML? > > > On Tue, May 26, 2009 at 10:21 AM, saa...@gmail.com wrote: > > > > Good day > > > > How can I get current textarea that was changed in fckEditor value > > > with javascript. > > > I got: > > > Hello > > > Then happens this: $('textarea').fck({ path:'/fckeditor/' }); , so now > > > I get fckEditor insted my textarea. Then I change the original text in > > > fckeditor to "Hello world". When I press the button with javascript > > > like this: > > > function myfunc(formid) > > > { > > > gotForm = document.getElementById(formid); > > > newContent = gotForm.elements.comment.value; > > > } > > > > Variable 'newContent' still has value only "Hello", NOT new value > > > "Hello world". > > > > So the question - how can I get new value of fckEditor with my > > > javascript? > > > > Best regards- Paslēpt citēto tekstu - > > > - Rādīt citēto tekstu -
[jQuery] Re: Force the browser to render window
I'm not understanding the "extra click anywhere" part. Is it a 'blur' that is triggering something? Exactly how are you doing what you're doing? Maybe it's just an IE bug where things are not working as expected. If you could show us how you're doing what you're doing, maybe we could help debug it and find a workaround. On May 26, 11:52 am, foldiman wrote: > Is there a javascript or jQuery method available to force the browser > to render the contents of the window? This would something similar to > updating the "stage" in Director or Flash. > > I have a two-column interaction set up where users input information > in one column and see their results in another. Safari, Firefox, etc > all work perfectly. IE however needs an extra click anywhere on the > browser window for the results to appear. So I'm looking for a way to > attach a function to a UI control that 'forces' IE to render the > screen so the changes appear. > > Thanks.
[jQuery] Re: Newbie question- declarative selectors inside procedural code
Excellent! Glad to see you figured that one out. Rest assured that *every* web developer has pulled out hair related to that particular issue. Fortunately, in many editors today, you can run a tool called 'jslint' that does a simple syntax check for you. In my editor (TextMate), I actually have it set up to do that check every time I save. _jason On May 26, 2:05 pm, colin_e wrote: > Just to finish this one off, I discovered my problem in IE6 was > nothing to do with the jquery search operation we were discussing. > > As I was working on the code I had added an object initialisation > above the line in question that had an extra comma at the end, as in- > > var frames= { > EM: 1*offset, > . > . > . > YH: 10*offset, //< }; > > IE6 choked on this, whereas Firefox was quite happy with it. > > I've done enough little bits of Perl, PHP, and now JavaScript over the > years that I have terrible trouble remembering exactly which bits of > syntax will or won't work with each! > > Thanks again to Jason, my little dynamic map works like a charm. > > Regards: colin_e > > On May 25, 8:29 pm, kiusau wrote: > > > On May 25, 3:44 am, Jason Persampieri wrote: > > > > Certainly... you're really not all that far off at all... let me just > > > point out a couple of things. > > > Very nice presentation! > > > It is likely that many novice users of jQuery will be able to benefit > > from it. Please do respond to the originator's question about the use > > of :first-child in IE, and suggest a work around if, indeed, it is an > > issue. > > > Roddy
[jQuery] Re: [New Plugin] jQuery Generic Pagination
The demos look great, Eric! I'm sure this will come in handy! Congrats! Rick On Tue, May 26, 2009 at 4:55 PM, Eric Garside wrote: > > I figured I'd drop a message out to the board about a new plugin I've > finished documenting and released, called Pagination. It's a small, > relatively simple jQuery plugin which makes rendering and managing > Pagination controls very easy. It automatically generates groupable > controls, which can be themed, moved, and reused without a lot of > overhead. The plugin is open ended, allowing the user to define how > they want to render the content. It's a very simple way to create > grouped pagination triggers. If ya'll could take a look at the docs > and demo, and let me know if you have any suggestions, or come upon > any problems, that'd be great. Thanks. :D > > Documentation: http://eric.garside.name/docs.html?p=pagination > Demo: http://eric.garside.name/demo.html?p=pagination > > -- -- "Ninety percent of the politicians give the other ten percent a bad reputation." Henry Kissinger
[jQuery] Re: Jquery Block plugin
> In a simplistic form > > $("#BlockID").block(); > $.ajax( > success: function(results) { > // Do stuff with "results" > $("#BlockID").unblock(); > }, > error: function(x,y,z) { > //x.responseText has the server error text > $("#BlockID").unblock(); > } > ); Even simpler, from the main BlockUI doc page: http://www.malsup.com/jquery/block/ $().ajaxStart($.blockUI).ajaxStop($.unblockUI);
[jQuery] Re: ajax append problem
When i try this i get an error "object required" in IE6 and 7. any thoughts? On Apr 27, 10:10 pm, Ricardo wrote: > I think you have to separate the selector otherwise it's just a hash: > > $(".content").load("test.html #content"); > > http://docs.jquery.com/Ajax/load > > On Apr 27, 5:14 pm, Charlie wrote: > > > $(".content").load("test.html#content"); > > this will grab only theidcontent from test.html andloadit , can refine this > > down to elements within #content as well > > example on jQuery site shows same > > methodclicforw...@googlemail.comwrote:Hello Michael, thanks for this. I got > > a error: > html.find is not a function Any idea? > type='text/javascript' > > src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js'> > > $(document).ready(function(){ $.ajax({ > > url: "leistung.html", cache: false, success: function(html) { var loadCont > > = html.find('#cont'); $(".content").append(loadCont); } }); }); > > On Apr 27, 5:07 pm, Michael Lawsonwrote:instead of > > $(".content").append(html); do var contentToAppend = html.find("#cont"); > > $(".content").append(contentToAppend); cheers Michael Lawson Content Tools > > Developer, Global Solutions, ibm.com Phone: 1-828-355-5544 E-mail: > > mjlaw...@us.ibm.com'Examine my teachings critically, as a gold assayer > > would test gold. If you find they make sense, conform to your experience, > > and don't harm yourself or others, only then should you accept them.' > > From: "clicforw...@googlemail.com" > > To: "jQuery > > (English)" > > Date: 04/27/2009 11:03 AM > > > > Subject: [jQuery]ajaxappend problem > > Hello, im > > using this script toloada external site into my DOM. It works fine but i > > need just a part of this test.html. For example: I want to append just the > > div "#cont" from test.html How can i do that? > type="text/javascript"> $.ajax({ url: "test.html", cache: false, > > success: function(html){ $(".content").append(html); }}); > > Thanks for Help! graycol.gif < 1KViewDownload ecblank.gif < 1KViewDownload
[jQuery] Odd .hover effect in IE7
Using hover effect works fine in Firefox however it produces an odd effect in IE7. On hover the background-image gives the appearance of shifting up 1px and to the left 1px, also the text font changes. The background-image has rounded corners, the hover effect changes the corners to appear straight. Very strange. The lite version of the page code is below. --- [ external js file (using jquery v1.3.2) ] --- $(document).ready(function() { $("ul#menu_primary > li a").hover( function() { $(this).animate({ opacity: 0.75 }, "fast"); $(this).animate({ opacity: 1.0 }, "fast"); // OR //$(this).fadeTo("fast", 0.75); //$(this).fadeTo("fast", 1.0); } ); }); --- [ css ] --- #pagenav {background:#FFF url(/include/graphic/theme/1/ bkgrd_pagenav_hp.png) no-repeat left top !important;} #pagenav #menu_primary {height:41px;list-style-type:none;margin-bottom: 0;} #pagenav #menu_primary li {float:left;margin:0;} #pagenav #menu_primary li a {color:#FFF;display:block;text- align:center;text-decoration:none;width:156px;} #pagenav #menu_primary li a:visited {color:#FFF;} #pagenav #menu_primary li a:hover {color:#66B7EC;} #pagenav #menu_primary li a#itemA {background:url(/include/graphic/ theme/1/menu_itemA.png) no-repeat left top !important;} #pagenav #menu_primary li a:hover#itemA {background:url(/include/ graphic/theme/1/menu_itemA.png) no-repeat left bottom !important;} --- [ html ] --- Item A Item B Item C Item D Item E Item F I appreciate all suggestions. -brian-
[jQuery] Suckerfish - issue with vertical styling
Hello, Thanks for making such a great menu system as Suckerfish available to the Joomla community. I am having trouble with the vertical styling of the menu. On mouse- over and mouse-off, every menu item turns to a grey color and stays that way until I refresh the page again. Any suggestions? Here is an example of this. Check out the orange vertical menu on this page: http://turkanabasin.org/review Thanks in advance for your insight.
[jQuery] [validate] IE8 Does Not Work
I was wondering if there was an update for validate plugin because it does not work in IE8 and even though i do server side thats sucks Thanks Rick
[jQuery] Values (a cheesy intro to a very useful plugin)
http://plugins.jquery.com/project/Values Think of this as val() crossbred with serializeArray() and raised on steroids. Or a JSON<->HTML mapping tool. Or a template plugin that can handle complex data structures, works in reverse and uses only HTML as its syntax. It works with single values. It works with value arrays. It works with whole objects. Or all three combined. Oh, and did i mention that it is really easy to configure and/or extend? Flexibility abounds, but it mostly just works, making your code robust and simple. Just remember, it has a generic name, because it is generally useful (and values() makes more sense as a method than mycoolpluginname()). Here's a little demo of some of the simpler abilities: http://jquery-values.googlecode.com/svn/trunk/jquery.values.htm Here's a link to the latest version: http://jquery-values.googlecode.com/svn/trunk/jquery.values.js If you're curious about how it works but don't feel like reading the docs, here's the short version: - Put a name attributes on an element (any, not just input/select/textarea) - Call values() on that element (or a parent!! this is a key part!) to get back a JSON version. - Call values(myJSON) on that element to push values into the element(s) - Call values('foo') to get just the one value. - Call values('foo', 'bar') to set just the one value. This all works well with nested objects and arrays too. After all, the world is not flat; your data (or markup) shouldn't have to be either. Both JSON and HTML contain a lot of information in their very structure and types. Values takes advantage of this to make intelligent choices about how to map one to the other. If you ever disagree about those decisions or want to amend them, there's quite a few configuration options and ways to extend the plugin to handle new element types or just handle familiar ones differently. If you are using javascript to do anything more than make your pages do shiny animations, you have probably come across the need to write data into a page, extract data from your markup or just copy data around the page. jQuery's html(), text(), val() and even attr() methods are handy, but they only do so much for you. You still have to select the right elements to get/set the data and know which method is appropriate. In development especially, when your markup and/or data structures are frequently changing, this can become a pain point. Or even if it doesn't pain you, values() is a better way! Anyway, give it a try! It's fun! It's easy! Everyone is... wait... no, everyone is not doing it. At least, not yet. That's why i'm writing this. I think i've got something helpful here, and i'd like to share. I want all the joy and ego validation that having many users brings. But more than that, i want bug finders. I want bug fixers. I want help with docs and demos and extensions. I want good user questions. I want YOU! So, give it a try and send me some feedback. I can handle the abuse (i hope). Just reply to this email or write the list with [Values] in the subject so that i notice you. thanks, nathan
[jQuery] Force the browser to render window
Is there a javascript or jQuery method available to force the browser to render the contents of the window? This would something similar to updating the "stage" in Director or Flash. I have a two-column interaction set up where users input information in one column and see their results in another. Safari, Firefox, etc all work perfectly. IE however needs an extra click anywhere on the browser window for the results to appear. So I'm looking for a way to attach a function to a UI control that 'forces' IE to render the screen so the changes appear. Thanks.
[jQuery] Question about strange Superfish behaviour
Hello, Thanks for making such a great extension as Superfish available to Joomla users. I am having a strange problem with the menu when I try to use it on my site with vertical configuration. When the page loads it appears fine. However, after hovering over each menu item, the color of the menu turns to grey and stays that way until I refresh the page. Surely this cannot be the way the menu is designed and must be a problem on my part. An example of this issue can be seen here: http://turkanabasin.org/review Just mouse-over and mouse-off any menu item and see what I mean. Thanks in advance for any insight.
[jQuery] Re: number of checked boxes
Thanks for your help. I appreciate it Sig On May 26, 2:44 pm, James wrote: > var checked = $("input[type=checkbox]:checked").length; > > if (checked >= 1) { > // do something > > } > > On May 26, 11:27 am, macsig wrote: > > > Hello all, > > I have a form with some checkboxes and I would like to submit it > > (through jquery) only if at least 1 checkbox is checked, otherwise I > > want to display an alert message. > > > How can I get the number of checked boxes? > > > I tried $("INPUT[type='checkbox']").is(':checked') but looks > > like it doesn't work. > > > Any ideas about how I can achieve so? > > > Thanks and have a nice day! > > > Sig
[jQuery] Re: input field name include "." jquery cann't parse
$("#user\\.name") seems to work in FF3. Haven't tried in other browsers. On May 25, 10:09 pm, "weit...@263.net" wrote: > when i use jquery get a input like > > > use $("#user.name") is error > > if input is > > use $("#username") is right > > is bug?
[jQuery] Re: Parents without a particular child
Disregard, I changed the data to make a little more sense. On May 26, 4:59 pm, Todd Rafferty wrote: > I've been staring at code for way too long. I have a data structure > like: > > > Stuff Move > More Stuff > > > How do I get the li that doesn't have 'a.movethis'?
[jQuery] Re: number of checked boxes
var checked = $("input[type=checkbox]:checked").length; if (checked >= 1) { // do something } On May 26, 11:27 am, macsig wrote: > Hello all, > I have a form with some checkboxes and I would like to submit it > (through jquery) only if at least 1 checkbox is checked, otherwise I > want to display an alert message. > > How can I get the number of checked boxes? > > I tried $("INPUT[type='checkbox']").is(':checked') but looks > like it doesn't work. > > Any ideas about how I can achieve so? > > Thanks and have a nice day! > > Sig
[jQuery] number of checked boxes
Hello all, I have a form with some checkboxes and I would like to submit it (through jquery) only if at least 1 checkbox is checked, otherwise I want to display an alert message. How can I get the number of checked boxes? I tried$("INPUT[type='checkbox']").is(':checked') but looks like it doesn't work. Any ideas about how I can achieve so? Thanks and have a nice day! Sig
[jQuery] Re: Where to find a proper slide effect?
Like probably a lot of people at this point, I'm hesitant to offer a mere suggestion since you seem to want a complete solution worked out for you. But your example does a simple toggle, which is a wrapper around the animate function. I would say, try using animate() directly and experiment with the parameters. From all indications, the toggle bumps the div out to its 360px height (per the style attribute) and then does it's animation. Since you have chosen the minified jquery I can't breakpoint and see what exactly the sequence of actions is while the animation is running. On May 26, 2:49 pm, "M.M." wrote: > On May 26, 8:32 pm, tain wrote: > > > they only have different easing value..otherwise they are identical. > > No they're not! Are we looking at the same page? > > The effect you get when you click "Slide Out" or "Slide In" > onhttp://docs.jquery.com/Tutorials:Live_Examples_of_jQueryis NOT the > slide effect I want. > > It's not even similar to scriptaculous effect in my example, because > the text doesn't go with the slide, it just stays in place and gets > revealed (it's normal jQuery 'slide' effect, in jQuery UI it's called > 'blind') > > Please, people, don't post answers like this, someone who actually > knows the answer might think it's already answered.
[jQuery] Re: Newbie question- declarative selectors inside procedural code
Just to finish this one off, I discovered my problem in IE6 was nothing to do with the jquery search operation we were discussing. As I was working on the code I had added an object initialisation above the line in question that had an extra comma at the end, as in- var frames= { EM: 1*offset, . . . YH: 10*offset, //< wrote: > On May 25, 3:44 am, Jason Persampieri wrote: > > > Certainly... you're really not all that far off at all... let me just > > point out a couple of things. > > Very nice presentation! > > It is likely that many novice users of jQuery will be able to benefit > from it. Please do respond to the originator's question about the use > of :first-child in IE, and suggest a work around if, indeed, it is an > issue. > > Roddy
[jQuery] Superfish open menu with ENTER key
Hello I am using Superfish 1.4.8 for making a keyboard accessible menu with sub levels that open only when the user has tabbed to the option (focus is active on the element) and then presses the ENTER key. The reason for this is that this is intended for browsing with screen reader applications that will get confused if the sub level opens automatically, it needs to be done until the user requests it. Is there any way to use the click event instead of focus to open the menu? I am thinking about this line: $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call ($li);}); and tried modifying it using click instead of focus but the blur events starts working strange like closing the whole menu when the first option loses focus. Any help will be really appreciated. Thank you!!
[jQuery] Parents without a particular child
I've been staring at code for way too long. I have a data structure like: Stuff Move More Stuff How do I get the li that doesn't have 'a.movethis'?
[jQuery] Re: Question about Tutorial: Find me: Using selectors and events
A partial answer to my question on the difference between mouseenter and mouseover, in the jQuery documentation, Events/mouseenter (http:// docs.jquery.com/Events/mouseenter#fn), it states, then illustrates, that mouseover fires when the pointer moves into or out from child element, while mouseenter doesn't. --Carol
[jQuery] [New Plugin] jQuery Generic Pagination
I figured I'd drop a message out to the board about a new plugin I've finished documenting and released, called Pagination. It's a small, relatively simple jQuery plugin which makes rendering and managing Pagination controls very easy. It automatically generates groupable controls, which can be themed, moved, and reused without a lot of overhead. The plugin is open ended, allowing the user to define how they want to render the content. It's a very simple way to create grouped pagination triggers. If ya'll could take a look at the docs and demo, and let me know if you have any suggestions, or come upon any problems, that'd be great. Thanks. :D Documentation: http://eric.garside.name/docs.html?p=pagination Demo: http://eric.garside.name/demo.html?p=pagination
[jQuery] Re: input field name include "." jquery cann't parse
So if you had: how would you apply a style to that? can't say: #user.name { } because that would look for yeah, "poor choice" sure is relative, but why make things more difficult, when a simple dash or underscore would do the same thing (and not cause issues with basic CSS or jQuery) On May 26, 3:03 pm, Ricardo wrote: > "Poor choices" is relative. I'd love a way to use colons in IDs > avoiding the confusion with pseudo-selectors, kind of like namespacing > elements. If it's in the specs it's perfectly valid. > > On May 26, 9:17 am, MorningZ wrote: > > > No, it's not a bug, your selector is looking for an item of class > > "name"... so it's your selector that is the issue, not jQuery (your > > naming/id convention would also cause issues with CSS)... > > > If you insist on poor choices for naming your controls, it is still > > possible to select the items though > > >http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_... > > > On May 26, 4:09 am, "weit...@263.net" wrote: > > > > when i use jquery get a input like > > > > > > > use $("#user.name") is error > > > > if input is > > > > > > use $("#username") is right > > > > is bug?
[jQuery] Re: Jquery Block plugin
In a simplistic form $("#BlockID").block(); $.ajax( success: function(results) { // Do stuff with "results" $("#BlockID").unblock(); }, error: function(x,y,z) { //x.responseText has the server error text $("#BlockID").unblock(); } ); On May 26, 12:28 pm, Atticus wrote: > Hi all. I was trying to use the Block plugin. I really need to show a > modal popup on AjaxRequest and Stop it on Request End. How can I do > that. > > I have seen etTimeout($.unblockUI, 6000), but I need to run server > code,so I need to set this time out to the elapsed time in my server > method. > > Thanks
[jQuery] Re: Barcode Plugin : ean 8, ean 13, code 128 and some others directly in css (so ok for ie)
Barcode JQuery Plugin : 1.1 Changelog : standard 2 of 5 fixed
[jQuery] Re: jQuery, the Ready Function, and Other Javascript - A Dirt Simple Inquiry
1. Do you get errors if you remove the last 2 spry scripts? 2. Regardless of which script does what, you should put the $().ready ( always after all the scripts as a safety measure, there's no negative impact. 3. If I remember a recent discussion, you shouldn't use the vsdoc version of jQuery, it's only for the VS auto-complete. Load the normal one from http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js On May 26, 4:22 am, kiusau wrote: > QUESTION: What is the general rule for using the Ready function in > the presence of other Javascript? > > BACKGROUND: I have recently discovered that my previous problems with > the customization of the jQ Impromptu plug-in could be overcome > through isolation. In effect, I removed my script from the targeted > document, eliminated all of my self-created jQuery methods with the > exception of one, and tried the "package" in a different, separate > document. Everything functioned as intended. > > With renewed confidence I am now ready to return the "package" to the > originally targeted document. This is where you may be able to > help. > > Please examine the script below and note that I am using the Ready > function in combination with other script tags. I have organized the > script tags according to use or non-use with the Ready function. > Everything before the Ready function is called either directly or > indirectly by the Ready function. Everything after it is not. > > Do you see a possible source of error? > > type="text/css" /> > type="text/css" /> > > > > > script> >