Re: [jQuery] Re: Autocomplete plugin compatability with jQuery 1.4?
Yes, and yes. On Sun, Jan 31, 2010 at 3:41 PM, Jose jmal...@gmail.com wrote: On Fri, Jan 29, 2010 at 1:38 AM, Richard D. Worth rdwo...@gmail.com wrote: The latest version is jQuery UI Autocomplete, and it is compatible with jQuery 1.4. You can find it in jQuery UI 1.8rc1: http://blog.jqueryui.com/2010/01/jquery-ui-1-8rc1/ Is the UI autocomplete based on Jörn's autocomplete ? If seems a huge refactoring! regards
Re: [jQuery] Re: Autocomplete plugin compatability with jQuery 1.4?
The latest version is jQuery UI Autocomplete, and it is compatible with jQuery 1.4. You can find it in jQuery UI 1.8rc1: http://blog.jqueryui.com/2010/01/jquery-ui-1-8rc1/ - Richard On Thu, Jan 28, 2010 at 6:44 PM, dirk.diggler mitch.ab...@gmail.com wrote: Anthony, The short answer would appear to be no, it's not compatible. To be fair, I'm running a slightly tweaked version of the plugin, so its entirely possible the incompatibility is something I introduced. This seems unlikely, though, since Firebug never even hits the breakpoint I've set in the autocomplete entry point function. On Jan 19, 8:24 am, Anthony Rayner antray...@gmail.com wrote: Hi all, We're using Jörn Zaefferer's awesome 'Autocomplete http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/' plugin and wondered if anyone knows if it is compatible with jQuery 1.4? Be very intereseted to find out. Many thanks. Anthony.
Re: [jQuery] New Forums
On Fri, Jan 22, 2010 at 10:23 AM, Octavian Rasnita orasn...@gmail.comwrote: From: Karl Swedberg k...@englishrules.com On Jan 21, 2010, at 8:11 PM, brian wrote: FWIW, I'm pretty sure the decision to drop Google Groups is due to John Ressig's account being spoofed by spammers. No, that's not it. Okay, maybe it was one of the last straws, but we've been talking about moving to a forum for a couple years now. If you want to know what factors were involved in the decision, please read http://jquery14.com/day-07/new-jquery-forum/ I read that: Additionally, we wanted something that lowered the barrier to asking a question - something that anyone would be able to use Well, for some categories of users, the movement to a forum has done exactly the reverse, because a forum is much less accessible than a mailing list for screen reader users for example, but for other categories of users also. For example, if a user uses a good mail client, he or she could configure it so all the messages from the list to go to a specific folder, the messages that contain some words in the subjects or in the body to go to another special folder as they arrive, the messages are automaticly grouped by conversation, and they can easier be all saved locally or all deleted (or individually). And if a user has a good rss reader they can do the same with a forum. Also, using rss2email services, they could have the best of both worlds. The best solution from the perspective of the users would be to have a mailing list system that can also offer and present the messages on the web, but this would involve more work for JQuery developers, and it seems that this idea is the best, but there is nobody willing to help doing and administering it. So the JQuery developers have chosen to use a forum which is administered by somebody else. That's very OK, but I think at least the JQuery mailing lists should not be disabled, while there still are users that prefer using them. I don't know that they will be disabled, but if not they will be completely unmoderated. This means way more spam than before. In addition, many active contributors, including jQuery team members, have moved over to the forum, so there will be a lot less traffic on the mailing lists. People may still find help and answers, but it won't be the official forum. Just as before when the mailing list was the official forum, people found answers elsewhere. To be honest, I've never been a fan of forums, either. But after spending some time in the jQuery forum, I'm starting to appreciate its advantages over a plain mailing list. Can you please tell us which are those advantages? (in general, not only regarding JQuery forum.) *Tags* I tag and filter emails, and it's been really nice. But it's always bothered me that all the tagging and filtering I do has to be duplicated by everyone else consuming the same content. Using tags on the website forum, all this metadata can be shared. *Types* On the forum, there are 5 type of threads: Discussions, Questions, Ideas, Problems, and Announcements. These can be selected by the OP and corrected be a moderator, and searched and filtered on. Another piece of shared metadata. *Categories* Before we had 5 or 6 mailing lists for different sub-topics. Many times a day as a moderator, I would have to kindly ask someone to move a discussion to the correct forum, to keep noise down, to keep the list on-topic, and to ensure people saw the question and the answer in the right place, whether via email or web archive. This was not only a real pain, but it's not that much fun for anyone involved, especially new users that may not have a clue that there's more than one list, or which list to post to: jquery-en, jquery-dev, jquery-ui, jquery-ui-dev, jquery-a11y, etc. On the new website forum, not only is it easier to see which top-level forum topics are available for posting, but if something is posted in the wrong forum, a moderator can simply select 'Move this topic' and then select the correct sub-forum. That immediately reflects in any sorting, filtering, or categorization anyone does. Another piece of shared metadata. *Status* In addition to being able to tag, type, and categorize each thread, a moderator and/or the OP can set the status of a thread. The OP can select an answer as the best, meaning future visitors can read 2 messages instead of 20. Moderators can set the status as 'more info needed', closed, answered, open, in-progress, etc. All these statuses can be used in sorting and filtering. Another piece of shared metadata. Noticing a trend? *Moderation edit controls* Posts can be edited. This isn't possible with email, since the message was already sent. And the web archive stores only the original message. This needs to be used judiciously, but can be great for fixing typographical errors, adding some important keywords to a thread topic, fixing some formatting, etc. *Permalinks* Have
Re: [jQuery] jquery 1.4 and jqueryui tabs with ajax load
See http://forum.jquery.com/topic/jquery-1-4-upgrade-issues#1473700636757 - Richard On Mon, Jan 18, 2010 at 5:59 AM, Joris D'Huys jdh...@gmail.com wrote: I've upgraded to jquery 1.4 and my tabs with ajax load no longer work. uncaught exception: jQuery UI Tabs: Mismatching fragment identifier. When I use the previous jquery version, everything works fine. Any idea on how to solve this? Thanks
Re: [jQuery] jquery.stylish-select.js - problem in Internet Explorer
My guess is the field you are calling the plugin on also has an ASP.Net validator on it. When the plugin triggers the change event to notify the form element that the user changed the value, the ASP.Net validator receives the event with the wrong target. See http://dev.jqueryui.com/ticket/4071 The plugin could be updated to use fireEvent in IE to prevent this issue. I'm still working on whether it makes sense (and how) to fix this in jQuery core's .trigger. See http://groups.google.com/group/jquery-dev/browse_thread/thread/b373713680e58be7 - Richard On Sun, Jan 10, 2010 at 1:56 PM, Yvan yvana...@gmail.com wrote: I'm using Jquery's Stylish Select plugin to replace a dropdown box in a form (ie: Facility Type): http://www.coverall.com/cnaws/quoterequest.aspx Although it's working fine in both Firefox and Safari, .. I'm having a problem with it in IE 7/8. The first problem that I'm having is that I'm getting a strange Javascript error message when I click on and try to select one of the options in the dropdown box: Message: 'length' is null or not an object Line: 172 Char: 17 Code: 0 URI: http://www.coverall.com/cnaws/WebResource.axd?d=w7y_20eVwtqkECBvGtTXhctz7tfIr5GP58PmekFUdQI1t=633700576732852734 The second problem that I'm having (which I suspect is related to the javascript error message I'm getting in some way) ... is that I am not able to select any of the options in the dropdown box. The page that I'm trying to integrate this into is part of a .NET application. Is it possible that there is something .NET specific that is creating a conflict in IE? How can I fix this? Thanks in advance, - Yvan
Re: [jQuery] Dialog bug
This is because the iframe is picking up the mouse events and not the page that the dialog is in. To prevent this, place a div over the entire iframe during the dialog drag. You can create and position this element in the dialog's dragStart and remove it in the dragStop: http://docs.jquery.com/UI/Dialog#event-dragStart http://docs.jquery.com/UI/Dialog#event-dragStop - Richard On Fri, Jan 1, 2010 at 6:20 AM, Yuriy Pobezhymov yuradoc.commerc...@gmail.com wrote: Hello. I have iframe (100% width and height) and jQueryUI dialog on the page. I don't know why, but when I move or resize dialog, it's work not correctly. You could see example here: http://lst.zt.ua/example If I make width:50%, than dialog works very good on blank part of page, but don't work correctly on iframe part.
Re: [jQuery] jquery customised easing
This can be achieved by using the easing plugin http://plugins.jquery.com/project/Easing which is included in the jQuery UI Effects Core. See here for a demo: http://jquery-ui.googlecode.com/svn/trunk/demos/effect/easing.html I think the one you're looking for is 'easeOutBack' - Richard On Wed, Dec 30, 2009 at 8:37 AM, t1mmie t1m...@hotmail.com wrote: Hey all. I'll be quite amazed if anyone can help me with this one. I've been scouring the internet trying to find a tutorial on this, but no such luck!! I'm putting together my own little side navigation and I have an affect in my mind that I want to achieve and I'm sort of half-way there. I've thrown together [URL=http://www.webhero.co.uk/help/]a demo, here[/URL] ( http://www.webhero.co.uk/help ) of what I've made so far. I basically want the background to slide up and down depending on what menu the mouse hovers on to, with an easing (or bouncing) effect when you move over each one. I want the bouncing thing to go both ways, so that if the background is at the bottom and you hover over a link above, the background moves a little past the final result and then back -- so wherever it moves, it bounces or eases a little into place. Another thing to consider is that whatever page the user is on, the little bar will start off and go back to there - so in the demo we're presuming the user is on the 'web design' page. (You'll need to see the demo by now to see what I mean :P) As you can see, I've programmed this to work fine if you're moving your mouse top to bottom, but if you go from bottom to top - you'll see in the code that I'll need to put some conditional statements around the animations to test whereabouts the background currently is - and that's what I need help with really. Also if anyone has a few tips on how I can shorten down my javascript code here that would be awesome :) Or, if anyone has a better way of achieving what I'm trying to altogether then I gratefully welcome anyone's thoughts. It'll be easier to view the source but I'll include the html and JS here. [code] !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js; type=text/javascript/script script src=js.js type=text/javascript/script script src=bg.js type=text/javascript/script script src=png.js type=text/javascript/script style #side { min-height:600px; height:600px; width:243px; float:left; background:url(sidebg.jpg) no-repeat #33; background-position:71px 9px; } #side li, #side ul { list-style:none; padding:0; margin:0; float:left; } #side a * { display: none; } #side a, #side a .hover { height:36px; width:172px; position:relative; display:block; background:url(side.png); } #side a.webdesign { margin:10px 0 7px 71px; width:172px; background-position:0 0; } #side .highlight a.webdesign:hover, #side a.webdesign .hover { background-position:-172px 0; } #side a.seo { margin:5px 0 7px 71px; width:172px; background-position:0 -40px; } #side .highlight a.seo:hover, #side a.seo .hover { background-position:-172px -40px; } #side a.blog { margin:5px 0 7px 71px; width:172px; background-position:0 -80px; } #side .highlight a.blog:hover, #side a.blog .hover { background-position:-172px -80px; } #side a.contact { margin:5px 0 7px 71px; width:172px; background-position:0 -120px; } #side .highlight a.contact:hover, #side a.contact .hover { background-position:-172px -120px; } /style /head body div id=side style=background-position: 71px 9px ul
Re: [jQuery] jquery customised easing
The easing plug-in doesn't care what property is being animated: $('#side').animate({backgroundPosition: 71px 9px}, 500, 'easeOutBack'); - Richard On Wed, Dec 30, 2009 at 9:50 AM, t1mmie t1m...@hotmail.com wrote: Hey Richard, thanks for your reply!! Yeah I was aware of the easing plug-in but I didn't think it could be used in the way I need it? As I am positioning background image..? Please correct me if I'm wrong - better yet - show me how? :D Thanks again Richard D. Worth-2 wrote: This can be achieved by using the easing plugin http://plugins.jquery.com/project/Easing which is included in the jQuery UI Effects Core. See here for a demo: http://jquery-ui.googlecode.com/svn/trunk/demos/effect/easing.html I think the one you're looking for is 'easeOutBack' - Richard On Wed, Dec 30, 2009 at 8:37 AM, t1mmie t1m...@hotmail.com wrote: Hey all. I'll be quite amazed if anyone can help me with this one. I've been scouring the internet trying to find a tutorial on this, but no such luck!! I'm putting together my own little side navigation and I have an affect in my mind that I want to achieve and I'm sort of half-way there. I've thrown together [URL=http://www.webhero.co.uk/help/]a demo, here[/URL] ( http://www.webhero.co.uk/help ) of what I've made so far. I basically want the background to slide up and down depending on what menu the mouse hovers on to, with an easing (or bouncing) effect when you move over each one. I want the bouncing thing to go both ways, so that if the background is at the bottom and you hover over a link above, the background moves a little past the final result and then back -- so wherever it moves, it bounces or eases a little into place. Another thing to consider is that whatever page the user is on, the little bar will start off and go back to there - so in the demo we're presuming the user is on the 'web design' page. (You'll need to see the demo by now to see what I mean :P) As you can see, I've programmed this to work fine if you're moving your mouse top to bottom, but if you go from bottom to top - you'll see in the code that I'll need to put some conditional statements around the animations to test whereabouts the background currently is - and that's what I need help with really. Also if anyone has a few tips on how I can shorten down my javascript code here that would be awesome :) Or, if anyone has a better way of achieving what I'm trying to altogether then I gratefully welcome anyone's thoughts. It'll be easier to view the source but I'll include the html and JS here. [code] !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en head script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js; type=text/javascript/script script src=js.js type=text/javascript/script script src=bg.js type=text/javascript/script script src=png.js type=text/javascript/script style #side { min-height:600px; height:600px; width:243px; float:left; background:url(sidebg.jpg) no-repeat #33; background-position:71px 9px; } #side li, #side ul { list-style:none; padding:0; margin:0; float:left; } #side a * { display: none; } #side a, #side a .hover { height:36px; width:172px; position:relative; display:block; background:url(side.png); } #side a.webdesign { margin:10px 0 7px 71px; width:172px; background-position:0 0; } #side .highlight a.webdesign:hover, #side a.webdesign .hover { background-position:-172px 0; } #side a.seo { margin:5px 0 7px 71px; width:172px; background-position:0 -40px; } #side .highlight a.seo:hover, #side a.seo .hover { background-position:-172px -40px; } #side a.blog { margin:5px 0 7px 71px; width:172px; background-position:0 -80px
Re: [jQuery] Re: how to access elements with index in for-loop
What about using .each? http://docs.jquery.com/Core/each#callback - Richard On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong ericiszhongwen...@gmail.comwrote: 2009/12/24 Eric Zhong ericiszhongwen...@gmail.com when i use for-loop to access elements with array index or get() method it doesn't work. but i have to use the index to access, what happen please . ok: http://jsbin.com/olego wrong: http://jsbin.com/ulixu wrong:http://jsbin.com/axugi
Re: [jQuery] Re: how to access elements with index in for-loop
The index is passed as the first argument to the callback function you provide to .each. - Richard On Wed, Dec 23, 2009 at 8:49 PM, Eric Zhong ericiszhongwen...@gmail.comwrote: 2009/12/24 Richard D. Worth rdwo...@gmail.com What about using .each? http://docs.jquery.com/Core/each#callback - Richard On Wed, Dec 23, 2009 at 8:34 PM, Eric Zhong ericiszhongwen...@gmail.comwrote: 2009/12/24 Eric Zhong ericiszhongwen...@gmail.com when i use for-loop to access elements with array index or get() method it doesn't work. but i have to use the index to access, what happen please . ok: http://jsbin.com/olego wrong: http://jsbin.com/ulixu wrong:http://jsbin.com/axugi thank you, i have tested .each(), it works well , but i need the index, may be the .each() can carry out too, but i think the index will more simple.
Re: [jQuery] Re: dialog box
On Mon, Dec 21, 2009 at 11:01 PM, Jojje jojjsus_chr...@hotmail.com wrote: oh ok :) Thanks for taking time to answer :) So now i got this, it works but it sends the ajax calls twice. is it maybe because i set the callback wrong? the callback argument gets: function() { fGbDelete(gbid,link); } Shouldn´t it get just: fGbDelete(gbid,link)? Or why is it triggering twice? Because you're animating two elements, so they each trigger the callback at the end of the animation. See http://jsbin.com/uzite3 source: http://jsbin.com/uzite3/edit - Richard
Re: [jQuery] Dialog only opening the once
See http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/ Also, if you should have any more questions, note there's a separate list for jQuery UI: http://groups.google.com/group/jquery-ui - Richard On Tue, Dec 22, 2009 at 5:22 AM, Sir Rawlins robert.rawl...@thinkbluemedia.co.uk wrote: Hello Guys, I'm using the jQuery UI plugin to create a modal dialog box to ensure the user is ready to commit an action. The code sample can be found here: http://pastebin.com/m1834215a Now, when the page first loads and I click a id=cancel the dialog box appears, however, if I close the dialog box and then click on the link a second time, nothing happens. I have to reload the page before being able to click on the link again. Can anyone suggest why this might be an issue? Surely it should open consistently every time? Thanks, Robert
Re: [jQuery] UI dialog, How to center buttons
.ui-dialog .ui-dialog-buttonpane { text-align: center; } .ui-dialog .ui-dialog-buttonpane button { float: none; } - Richard On Tue, Dec 22, 2009 at 1:44 PM, RobGMiller robgmil...@gmail.com wrote: What is the easiest way to manage button location at runtime?
Re: [jQuery] Re: jQuery in e107 plugin?
Sure, just include jQuery UI before including the second jQuery, or after the noConflict call. - Richard On Sun, Dec 20, 2009 at 7:11 AM, Harsányi János hajani...@gmail.com wrote: This sounds great :) One more problem: Can I extend the first jQuery with jQuery UI? On Dec 19, 9:31 pm, Richard D. Worth rdwo...@gmail.com wrote: After the second one is loaded you can get back to the first one using noConflict: http://docs.jquery.com/Core/jQuery.noConflict - Richard On Fri, Dec 18, 2009 at 11:13 AM, Harsányi János hajani...@gmail.com wrote: I have two e107 plug ins which are using jQuery. The first one uses jQuery UI too. The problem is that the second plug in re-defines the jQuery without the UI extension, and the first plug in is not able to work properly. Is there any way to load jQuery only if it has not been added yet? (I have tried typeof(jQuery) but it is throwing an error: jQuery is not defined.)
Re: [jQuery] dialog box
This can't be done with JavaScript. In order for JavaScript to be able to display an Ok and Cancel button for the user to press, JavaScript cannot also be waiting to return a value for your function as that would block the browser UI, since JavaScript is single-threaded. You have to use callback functions instead. Here's an example: http://jqueryui.com/demos/dialog/#modal-confirmation view source: http://jqueryui.com/demos/dialog/modal-confirmation.html Notice that the function that creates the dialog returns right away. Then JavaScript is able to handle the dialog being interacted with, and eventually either button click. Rather than those callback functions returning a value, they carry out what your function would do depending on which button is clicked. - Richard On Mon, Dec 21, 2009 at 10:00 AM, Jojje jojjsus_chr...@hotmail.com wrote: Hi! I´m trying to make a dialog box , where you can press ok or cancel. How do i set the function so that when a user press ok it returns true? I'm new to javascript an jQuery so bare with me but this is what i got so far... function dialogBox(type,blockUi,heading,message) { var result; var signImg; var buttons; var ok = 'divinput type=button id=okBtn value=Ok //div'; var cancel = 'divinput type=button id=cancelBtn value=Cancel //div'; //warning dialogbox if (type == 'warning' || type == '') { signImg='_img/signs/warning.png'; buttons = ok + cancel; } //Info dialogbox else if (type == 'info') { signImg = '_img/signs/info.png'; buttons = ok; } //Fatal dialogbox else { signImg = '_img/signs/error.png'; buttons = ok; } //Create dialogbox function dialogBoxCreation() { $('div id=dialogBoximg src='+signImg+' alt=sign / h3' + heading + '/h3p'+message+'/p'+buttons+'/div') .appendTo('body') .center() .hide() .fadeIn(); } dialogBoxCreation(); //BlockUi if (blockUi=='yes') { $('div id=dialogBg/div').height($('body').height()).width ('100%').css({ 'position': 'absolute', 'background': '#000', 'opacity': '0.6', 'z-index': '1' }).prependTo('body').fadeIn(); } $('#okBtn').click(function() { $('#dialogBox,#dialogBg').fadeOut(function() { $('#dialogBox').remove(); $('#dialogBg').remove(); }); }); $('#noBtn').click(function() { $('#dialogBox,#dialogBg').fadeOut(function() { $('#dialogBox').remove(); $('#dialogBg').remove(); }); }); } Thanks in advance George
Re: [jQuery] To make an Id using a variable
$(#utype + t) - Richard On Sat, Dec 19, 2009 at 3:18 PM, Andre Polykanine an...@oire.org wrote: Hello everyone, What I'm trying to do is to make a radio button checked depending on a variable gotten via PHP. Here's the code: // What radio button was checked previously? var t=?=$f[Type]?; // Say it was 2. Then the id must be #utype2 $(#'utype'+t).attr(checked, checked); What am I doing wrong? Maybe there's a way to do the same using the Value attribute of the input tag? -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule
Re: [jQuery] jQuery in e107 plugin?
After the second one is loaded you can get back to the first one using noConflict: http://docs.jquery.com/Core/jQuery.noConflict - Richard On Fri, Dec 18, 2009 at 11:13 AM, Harsányi János hajani...@gmail.comwrote: I have two e107 plug ins which are using jQuery. The first one uses jQuery UI too. The problem is that the second plug in re-defines the jQuery without the UI extension, and the first plug in is not able to work properly. Is there any way to load jQuery only if it has not been added yet? (I have tried typeof(jQuery) but it is throwing an error: jQuery is not defined.)
Re: Re[2]: [jQuery] To make an Id using a variable
var lang = 'fra'; $('#lang option[value=' + lang + ']').attr('selected', 'selected'); or var lang = 'deu'; $('#lang').val(lang); - Richard On Sat, Dec 19, 2009 at 3:35 PM, Andre Polykanine an...@oire.org wrote: Hello Richard and all, Yepp, it works) and if I want to do the same with a select box? select id=lang option value=enuEnglish/option option value=fraFrench/option option value=deuGerman/option Say, I have it previously set to French. Do I need to make a loop or I can do it in the same simple way? -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: Richard D. Worth rdwo...@gmail.com To: jquery-en@googlegroups.com jquery-en@googlegroups.com Date: Saturday, December 19, 2009, 10:24:40 PM Subject: [jQuery] To make an Id using a variable $(#utype + t) - Richard On Sat, Dec 19, 2009 at 3:18 PM, Andre Polykanine an...@oire.org wrote: Hello everyone, What I'm trying to do is to make a radio button checked depending on a variable gotten via PHP. Here's the code: // What radio button was checked previously? var t=?=$f[Type]?; // Say it was 2. Then the id must be #utype2 $(#'utype'+t).attr(checked, checked); What am I doing wrong? Maybe there's a way to do the same using the Value attribute of the input tag? -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule
Re: Re[2]: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page?
Is it, thanks to normalization done by jQuery, as Mike mentioned. - Richard On Sat, Dec 19, 2009 at 4:18 PM, Andre Polykanine an...@oire.org wrote: Hello Richard and all, Is that a multi-browser solution? Thanks a lot! -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: Richard D. Worth rdwo...@gmail.com To: jquery-en@googlegroups.com jquery-en@googlegroups.com Date: Friday, December 18, 2009, 3:19:55 AM Subject: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page? $(document).keypress(function(e) { if(e.ctrlKey e.which == 13) { $('#myForm').submit(); } }); or $('#myForm').keypress(function(e) { if(e.ctrlKey e.which == 13) { $(this).submit(); } }); - Richard On Thu, Dec 17, 2009 at 7:40 PM, Andre Polykanine an...@oire.org wrote: Hello Mike and all, Sorry, I also have a question about keypresses. I need a form to be submitted by pressing Ctrl+Enter. How do I manage to do that? Thanks! -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: Mean Mike mcgra...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: Thursday, December 17, 2009, 9:06:36 PM Subject: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page? keypress $(document).keypress(function(e) { if ((e.which e.which == 13) || (e.keyCode e.keyCode == 13)) { // do something } }); mean mike On Dec 17, 2:03 pm, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I would like to capture the event of pressing enter anywhere on the page, even if the focus of the mouse cursor is not on a text field. What event/element am I looking at? Thanks, - Dave
Re: Re[4]: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page?
Please share a live sample page showing the issue. If you don't have a place to host one, use jsbin.com: http://jsbin.com/ - Richard On Sat, Dec 19, 2009 at 5:02 PM, Andre Polykanine an...@oire.org wrote: Hello Richard and all, For some reason it doesn't work (IE8). Might it be due to the validation plugin? Thanks! -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: Richard D. Worth rdwo...@gmail.com To: jquery-en@googlegroups.com jquery-en@googlegroups.com Date: Saturday, December 19, 2009, 11:27:39 PM Subject: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page? Is it, thanks to normalization done by jQuery, as Mike mentioned. - Richard On Sat, Dec 19, 2009 at 4:18 PM, Andre Polykanine an...@oire.org wrote: Hello Richard and all, Is that a multi-browser solution? Thanks a lot! -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: Richard D. Worth rdwo...@gmail.com To: jquery-en@googlegroups.com jquery-en@googlegroups.com Date: Friday, December 18, 2009, 3:19:55 AM Subject: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page? $(document).keypress(function(e) { if(e.ctrlKey e.which == 13) { $('#myForm').submit(); } }); or $('#myForm').keypress(function(e) { if(e.ctrlKey e.which == 13) { $(this).submit(); } }); - Richard On Thu, Dec 17, 2009 at 7:40 PM, Andre Polykanine an...@oire.org wrote: Hello Mike and all, Sorry, I also have a question about keypresses. I need a form to be submitted by pressing Ctrl+Enter. How do I manage to do that? Thanks! -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: Mean Mike mcgra...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: Thursday, December 17, 2009, 9:06:36 PM Subject: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page? keypress $(document).keypress(function(e) { if ((e.which e.which == 13) || (e.keyCode e.keyCode == 13)) { // do something } }); mean mike On Dec 17, 2:03 pm, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I would like to capture the event of pressing enter anywhere on the page, even if the focus of the mouse cursor is not on a text field. What event/element am I looking at? Thanks, - Dave
Re: [jQuery] Help with draggable / droppable
Worked ok for me: http://jsbin.com/anure source: http://jsbin.com/anure/edit If you need any more help, note that there's a separate list for jQuery UI: http://groups.google.com/group/jquery-ui - Richard On Thu, Dec 17, 2009 at 1:14 PM, Alex Beston alex.bes...@gmail.com wrote: Hi there, I'm trying to create some words which can be dragged and dropped into a container. I've tried to dynamically create some divs each containing a word, and they can be dragged okay, but when I try to drop, it isnt recognised. thanks in advance, Alex - Heres the code I have so far: var these = [ 'red', 'blue', 'green', 'orange', 'white' ]; function makeButtons() { for (i in these) makeWord(these[i]); } function makeWord(s) { var e = $(document.createElement('div')); e.attr('id', s); // make a div with id orange / white / etc e.append(s); e.draggable( ); // make this div draggable $('body').append(e); } function initialise(){ makeButtons(); $(function(){ $(#droppable).droppable({ drop: function( ) { alert('dropped'); } }); }); } // html head script type=text/javascript $(document).ready( initialise ); /script /head body div id=droppable /div /body -
Re: [jQuery] Help with droppable
Answered here http://groups.google.com/group/jquery-en/browse_thread/thread/6baa555a340b3ec4 - Richard On Fri, Dec 18, 2009 at 5:28 AM, Alex Beston alex.bes...@gmail.com wrote: Hi there, I'm trying to create some words which can be dragged and dropped into a container (called droppable). I've tried to dynamically create some divs each containing a word, and they can be dragged okay, but when I try to drop, it isnt recognised. I notice that if I have a static div in the script it will be recognised by the droppable area (as per the example on the jquery site) thanks in advance, Alex - Heres the code I have so far: var these = [ 'red', 'blue', 'green', 'orange', 'white' ]; function makeButtons() { for (i in these) makeWord(these[i]); } function makeWord(s) { var e = $(document.createElement('div')); e.attr('id', s); // make a div with id orange / white / etc e.append(s); e.draggable( ); // make this div draggable $('body').append(e); } function initialise(){ makeButtons(); $(function(){ $(#droppable).droppable({ drop: function( ) { alert('dropped'); } }); }); } // html head script type=text/javascript $(document).ready( initialise ); /script /head body div id=droppable /div /body - -- rgds, Alex -
Re: [jQuery] Jquery using Modal Window with user input
You can use the jQuery UI Dialog with the modal option set to true. Here's an example: http://jqueryui.com/demos/dialog/#modal-form - Richard On Fri, Dec 18, 2009 at 10:12 PM, tinypond lawre...@tinypond.com wrote: What I am trying to do is the following: I have a webpage with some input fields, before the user can save the information to a database. I have the requirement to make the existing page dim and call up a modal window asking the user whey they made changes. This modal window would have a textbox to enter why the changes were made along with accept or cancel buttons. If the accept button is pressed the information in the textbox needs to get past back to the webpage so it can then write all changed information along with the reason why it was changed to the database. If cancel was pressed nothing would be done. Could someone please point me to an example that does something similar to this or please tell me if this requirement is feasible. Thanks in advance for your help. -- View this message in context: http://old.nabble.com/Jquery-using--Modal-Window-with-user-input-tp26852412s27240p26852412.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] prompt before closing dialog
Handle the beforeclose event and return false if you don't want to allow the dialog to close yet: http://docs.jquery.com/UI/Dialog#event-beforeclose If you have any further questions, there's a separate list for questions about jQuery UI plugins: http://groups.google.com/group/jquery-ui - Richard On Thu, Dec 17, 2009 at 5:10 AM, Obi1 gurreiro_fa...@yahoo.com.br wrote: Hi, i'm having some trouble because i'm using a dialog witch has a form in it where someone can change info about their hotel. this dialog also has 2 buttons one to close and the other to save changes. what i'm trying to accomplish is - when someone made sany change and tries to close de dialog without saving he will be prompt if he really wants to leave without saving the changes an the dialog only closes if person choses 'yes'. when closing the window clicking the 'close' button i can accomplish this, but i wanted it also to work when closing dialog using the x button on the top of the dialog. is this possible?
Re: [jQuery] Re: Styling dynamic content
Works for me: http://jsbin.com/egoto/ - Richard On Wed, Dec 16, 2009 at 8:44 PM, Jason Kaczmarsky jkaczmar...@yahoo.comwrote: Yes, I am sure they are the correct class and are showing up properly. Button press: //loop $(#files).append('div class=file'+Files[i]+'/div'); //end loop Firebug: div id=files style=display: block; div class=filework.txt/div div class=fileSAS Guide.txt/div /div On Dec 16, 7:43 pm, Smith, Allex allex.sm...@chelanpud.org wrote: The browser should render all the styles no matter when they enter. Are you sure that the class is assigned to those elements? I would make sure by peeking at the rendered html via Firebug. -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jason Kaczmarsky Sent: Wednesday, December 16, 2009 2:14 PM To: jQuery (English) Subject: [jQuery] Styling dynamic content So I've created a little app which loads some filenames into a div via an AJAX query. This happens when a user clicks a button, not when the page loads. Because of this, I cannot style the filenames how I want. I've tried using CSS to do the trick: .file{ color: #F00; } .file:hover{ cursor:pointer; color:#000; } This CSS colors the filenames red when it loads, but nothing in the hover event works. Instead of this, I tried using jQuery to style it. $(.file).hover(function(){ $(this).css(background-color,#F00); },function(){ $(this).css(background-color,#000); }); This also does not change anything. I assume it is because the element does not exist when the page is rendered, but later on. Although this doesn't explain why the text is red when I use the CSS, so I'm a bit confused. How would I accomplish this?
Re: [jQuery] traversal question for IE6 and IE7
Your html isn't valid. * A dl cannot contain a div directly as you've shown, only dts and dds. * The dt and dd elements inside the div#bar need to be directly inside the dl. They can't have a div as a parent. * The dt and dd elements don't close immediately when you put a closing slash in the opening tag. If you want to have them be empty and close them immediately, change dt / to dt/dt otherwise the browser ignores the slash in the opening tag and waits for some parsing rule to close the element. For more on that, see http://groups.google.com/group/jquery-en/browse_thread/thread/bef63592011861ba By the time the browser's html parser is done with it, your html might look something like this: div id=foo dl dt div id=bar/div /dt dt/dt dd/dd dt/dt dd id=baz/dd /dl /div which based on the html you've shared is a lot different than what you started with. - Richard On Wed, Dec 16, 2009 at 6:39 PM, cewing cew...@u.washington.edu wrote: Hi all, I've got a bit of HTML with the following structure: div id=foo dl dt / div id=bar dt / dd / dt / dd id=baz/ /div /dl /div in IE6 and IE7 $(dd#baz).parents() returns an object with 2 nodes in it, the dl and div#foo. it does not contain div#bar. I assume this is due to a stricter interpretation of proper DOM structure in IE6 and IE7 than in FF, Safari, Chrome, Opera, or even IE8 (where div#bar _is_ present). I need to find div#bar. Can someone suggest a traversal-based workaround to getting there from dd#baz that will work in IE6 and IE7? The problem with non-traversal based solutions is that the entire structure you see here may be nested inside each of the dd elements, and if so, I'd need to find the div#bar _closest_ in the parents hierarchy to the dd from which I begin. If absolutely necessary, I can scrap dl structure and go with a more pure div-based structure, but I'm trying to hook into some automatic styling in my chosen framework and that is hung on dl elements. Any suggestions?
Re: [jQuery] Re: prompt before closing dialog
Here's an example of using a confirm inside beforeclose Demo: http://jsbin.com/urosa Source: http://jsbin.com/urosa/edit - Richard On Thu, Dec 17, 2009 at 5:30 AM, Obi1 gurreiro_fa...@yahoo.com.br wrote: this doesn't seem to work, i mean the prompt appears but only after dialog is closed; also tryed using the beforeclose event but the prompt doesn't even show.
Re: [jQuery] Re: prompt before closing dialog
The built in browser confirm is the only way you can block (with for the user to respond) without blocking the UI. Any javascript confirm will have to use a callback instead of a return false. In that case you can return false to prevent the close, then use the result of the jConfirm callback to decide whether or not to call .dialog('close') manually. But you'll use a flag to prevent an infinite loop. - Richard On Thu, Dec 17, 2009 at 6:44 AM, Obi1 gurreiro_fa...@yahoo.com.br wrote: it doesn't work for me as i'm using jConfirm not javascript confirm but it will have to do while i don't find a solution. Thanks
Re: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page?
$(document).keypress(function(e) { if(e.ctrlKey e.which == 13) { $('#myForm').submit(); } }); or $('#myForm').keypress(function(e) { if(e.ctrlKey e.which == 13) { $(this).submit(); } }); - Richard On Thu, Dec 17, 2009 at 7:40 PM, Andre Polykanine an...@oire.org wrote: Hello Mike and all, Sorry, I also have a question about keypresses. I need a form to be submitted by pressing Ctrl+Enter. How do I manage to do that? Thanks! -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: Mean Mike mcgra...@gmail.com To: jQuery (English) jquery-en@googlegroups.com Date: Thursday, December 17, 2009, 9:06:36 PM Subject: [jQuery] Re: What is the event when a user presses the enter key anywhere on the page? keypress $(document).keypress(function(e) { if ((e.which e.which == 13) || (e.keyCode e.keyCode == 13)) { // do something } }); mean mike On Dec 17, 2:03 pm, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I would like to capture the event of pressing enter anywhere on the page, even if the focus of the mouse cursor is not on a text field. What event/element am I looking at? Thanks, - Dave
Re: [jQuery] Re: Styling dynamic content
See http://docs.jquery.com/Frequently_Asked_Questions#Why_doesn.27t_an_event_work_on_a_new_element_I.27ve_created.3F - Richard On Fri, Dec 18, 2009 at 12:23 AM, Jason Kaczmarsky jkaczmar...@yahoo.comwrote: Ahah, this was the problem I thought i was having. I can't make jQuery work on dynamic content. If an element with a class of file is added to the document, like the previous case, no jQuery event related to that element works. Ex: $(.file).click(function(){ alert(this) }); Nothing is ever alerted if that element is clicked. Example page: http://pendarenstudios.com/NEW/file_sel.php On Dec 17, 10:39 am, Jason Kaczmarsky jkaczmar...@yahoo.com wrote: I must have missed something cause I made a new page and rewrote the code and it worked fine. Thanks for the help guys. On Dec 17, 5:26 am, Richard D. Worth rdwo...@gmail.com wrote: Works for me: http://jsbin.com/egoto/ - Richard On Wed, Dec 16, 2009 at 8:44 PM, Jason Kaczmarsky jkaczmar...@yahoo.comwrote: Yes, I am sure they are the correct class and are showing up properly. Button press: //loop $(#files).append('div class=file'+Files[i]+'/div'); //end loop Firebug: div id=files style=display: block; div class=filework.txt/div div class=fileSAS Guide.txt/div /div On Dec 16, 7:43 pm, Smith, Allex allex.sm...@chelanpud.org wrote: The browser should render all the styles no matter when they enter. Are you sure that the class is assigned to those elements? I would make sure by peeking at the rendered html via Firebug. -Original Message- From: jquery-en@googlegroups.com [mailto: jquery...@googlegroups.com] On Behalf Of Jason Kaczmarsky Sent: Wednesday, December 16, 2009 2:14 PM To: jQuery (English) Subject: [jQuery] Styling dynamic content So I've created a little app which loads some filenames into a div via an AJAX query. This happens when a user clicks a button, not when the page loads. Because of this, I cannot style the filenames how I want. I've tried using CSS to do the trick: .file{ color: #F00; } .file:hover{ cursor:pointer; color:#000; } This CSS colors the filenames red when it loads, but nothing in the hover event works. Instead of this, I tried using jQuery to style it. $(.file).hover(function(){ $(this).css(background-color,#F00); },function(){ $(this).css(background-color,#000); }); This also does not change anything. I assume it is because the element does not exist when the page is rendered, but later on. Although this doesn't explain why the text is red when I use the CSS, so I'm a bit confused. How would I accomplish this?
Re: [jQuery] Call from Javascript to jQuery javascript function
On Tue, Dec 15, 2009 at 8:46 PM, brian zijn.digi...@gmail.com wrote: And, if you'd like callit() to be run only when the document is fully loaded, just wrap the call in another $(document).ready() block: script type=text/javascript $(document).ready(function() { // whatever stuff needs to occur when the doc is loaded }); // will be defined immediately function callit() { alert(Hello world!); } /script script type=text/javascript $(document).ready(function() { // will be run when doc is loaded callit(); }); /script No need to add another block. As you pointed out earlier, the document ready won't run until later. By the time it does, the callit function will have been defined: script type=text/javascript $(document).ready(function() { // will be run when doc is loaded callit(); }); // will be defined immediately function callit() { alert(Hello world!); } /script - Richard
Re: [jQuery] Viewport Scroll
See http://flesler.blogspot.com/2007/10/jqueryscrollto.html - Richard On Tue, Dec 15, 2009 at 2:42 PM, Wroathe reallyto...@gmail.com wrote: Hi there! I'm using jQuery to load in some content from a separate page and I was wondering if there was a way to make the browser viewport scroll down to the element I'm adding in by using jQuery or Javascript?
Re: [jQuery] beginner help with using custom jquery ui objects.
We'd love to help answer these questions over here: http://groups.google.com/group/jquery-ui Thanks. - Richard On Mon, Dec 14, 2009 at 7:02 PM, David_ca david.calling...@gmail.comwrote: Hi, With help from this tutorial http://bililite.com/blog/understanding-jquery-ui-widgets-a-tutorial/ I started to create my own custom ui objects based on the ui widget factory I am hoping somebody could help me with the object syntax. // Question 1) Alternate way to call a method of the widget. I am able to call method darker() of my widget using this syntax: $().ready(function() { var aGreen = $('#test4 .target').green4(); $('#test4 .target').green4('darker'); }); For me it is more natural to do the same thing using the below syntax but it does not work. Can someone tell me why it doesn't work and/or show my the best practice approach to create a variable of a widget object instantiation and reference it later. $().ready(function() { var aGreen = $('#test4 .target').green4(); aGreen.darker(); }); /// Question 2) How make a function return something. Supposing my widget has a getHello() method that returns a hello string How do I call that method of my widget. I tried the below code but it does not work. $().ready(function() { var aGreen = $('#test4 .target').green4(); console.log(response: + $('#test4 .target').green4('getHello')); }); /// Question 3) How to pass a parameter to a function. Supposing I have setDarker(value) function that takes a parameter How do I invoke that function. Below is the syntax I hope would work but it doesn't. $().ready(function() { var aGreen = $('#test4 .target').green4(); aGreen.setDarker(big); }); BAnd finally below is the html code I used for testing, Also a link to the same code is here http://docs.google.com/Doc?docid=0AbxHJxs0V9KvZGRucDVyNnJfMTdmZ3ZmOG4zNAhl=en Thank you for any help David // !DOCTYPE HTML PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http:// www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html dir=ltr xmlns=http://www.w3.org/1999/xhtml; lang=en- UShead profile=http://gmpg.org/xfn/11; titleHacking at 0300 : Understanding jQuery UI widgets: A tutorial/ title script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/ jquery.min.js type=text/javascript/script script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/ jquery-ui.min.jshttp://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/%0Ajquery-ui.min.js type=text/javascript/script script type=text/javascript $.widget('ui.green4', { getLevel: function () { return this._getData('level'); }, setLevel: function (x) { var greenlevels = this._getData('greenlevels'); var level = Math.floor(Math.min(greenlevels.length-1, Math.max (0,x))); this._setData('level', level); this.element.css({background: greenlevels[level]}); }, _init: function() { this.setLevel(this.getLevel()); }, darker: function() { this.setLevel(this.getLevel()-1); }, setDarker: function(value){console.log(value: +value)}, getHello: function(){hello}, lighter: function() { this.setLevel(this.getLevel()+1); }, off: function() { this.element.css({background: 'none'}); this.destroy(); } }); $.ui.green4.defaults = { level: 15, greenlevels: ['#000','#010','#020','#030','#040','#050','#060','#070','#080','#090','#0a0','#0b0','#0c0','#0d0','#0e0','#0f0', '#fff'] }; /script script type=text/javascript $().ready(function() { var aGreen = $('#test4 .target').green4(); $('#test4 .target').green4('darker'); }); /script /head body div id =test4 p class=target This is a test paragraph/p /div /body /html
Re: [jQuery] jquery numeric spinner and jqueryui tabs
On Wed, Dec 9, 2009 at 4:52 PM, Jason Meckley jasonmeck...@gmail.comwrote: it appears that calling load programatically (rather than clicking on the tab manually) does not call the show function. In that case, you might try .triggerHandler('click') - Richard
Re: [jQuery] Problem with images loaded dynamically
My guess would be to check and make sure the server is configured to send the appropriate mime-type for the file, based on the extension. - Richard On Mon, Dec 7, 2009 at 2:35 PM, jlee patrykk...@gmail.com wrote: Hi, I'm stuck here - I'm trying to load images dynamically on my website, but for some reason the method I use works on a server on my local computer, but behaves very strangely on a remote server... I use this code to load the images: function replaceImage(imgName, container) { $j(container).hide(); //so it fades out once the image has loaded $j(container).image(imgName, function() { //this is a simple plugin, i'll paste it's code below if(container != #galImage) { //if it's a thumbnail, i want to be able to click on it $j(container).empty().append(this).wrap(a href=\#\/a); } else { //it's not a thumbnail, so no a wrapper $j(container).empty().append(this); } $j(container).fadeIn(); //finally, show the image }); } The simple plugin for loading images into a container: $.fn.image = function(src, f){ return this.each(function(){ var i = new Image(); i.src = src; i.onload = f; this.appendChild(i); }); } This code is used like this: replaceImage('images/' + imgName, 'imgCont1'); As I said, everything works just fine on my machine with apache server installed. But, when I open the website located on a server, it turns out that most images don't appear at all, and the ones that do show up are severely distorted... Does anybody know what could cause that? Here's an example of such distorted image: http://www.eurydicesite.info/error.jpg The non-working site is available here: http://www.eurydicesite.info - when you click on portfolio, 9 thumbnail images should appear to the left, but they don't.
Re: [jQuery] selectedClass option in jQuery UI 1.7.2
This decision was made as part of our creation and adoption of the jQuery UI CSS Framework. This offers a set of generic widget classes that we use across all jQuery UI widgets, and we encourage others to make use of the same. Then all widgets can be themed with simplicity, using a pre-built theme, or rolling their own theme with themeroller.com. http://jqueryui.com/docs/Theming http://jqueryui.com/docs/Theming/ThemeRollerReady http://themeroller.com/ jQuery UI Tabs, like other jQuery UI widgets, continues to have widget-specific classes, as well as more generic css framework classes. They are summarized here: http://jqueryui.com/docs/tabs/#theming Notice for example that the selected tab gets both the ui-tabs-selected class (tabs specific) and the ui-state-active class (css framework). Both have the ui- prefix, meaning they're in the jQuery UI css class namespace. And they're managed by the plugin. For consistency and simplicity, we've made neither configurable. This is our standard way of communicating on the identity and state of the selected tab. It's up to the user to either write a css rule that contains one of these two classes, or manually add some other class at an appropriate time. - Richard On Mon, Dec 7, 2009 at 1:26 AM, Donny Kurnia donnykur...@gmail.com wrote: It's have been a long time since I use jQuery UI tabs in my project. My client want dragable function, so I use this opportunity to upgrade all jquery ui. However, I notice one page got broken, because now the class used for selected tab is hardcoded in the ui.tabs.js I search the ticket and found this: http://dev.jqueryui.com/ticket/3691 I just wonder, what the decision to remove the option and use hardcoded class instead? As I know, using hardcoded constant will lead to hard to maintenance code and might result in an inconsistence. Whatever the decision, I want to thanks to all jQuery developer and jQuery UI contributor. -- Donny Kurnia http://blog.abifathir.com http://hantulab.blogspot.com http://www.plurk.com/user/donnykurnia
Re: [jQuery] selectedClass option in jQuery UI 1.7.2
And if you have any future questions about jQuery UI, note there's a mailing list for it: http://groups.google.com/group/jquery-ui Thanks. - Richard On Thu, Dec 10, 2009 at 7:07 AM, Richard D. Worth rdwo...@gmail.com wrote: This decision was made as part of our creation and adoption of the jQuery UI CSS Framework. This offers a set of generic widget classes that we use across all jQuery UI widgets, and we encourage others to make use of the same. Then all widgets can be themed with simplicity, using a pre-built theme, or rolling their own theme with themeroller.com. http://jqueryui.com/docs/Theming http://jqueryui.com/docs/Theming/ThemeRollerReady http://themeroller.com/ jQuery UI Tabs, like other jQuery UI widgets, continues to have widget-specific classes, as well as more generic css framework classes. They are summarized here: http://jqueryui.com/docs/tabs/#theming Notice for example that the selected tab gets both the ui-tabs-selected class (tabs specific) and the ui-state-active class (css framework). Both have the ui- prefix, meaning they're in the jQuery UI css class namespace. And they're managed by the plugin. For consistency and simplicity, we've made neither configurable. This is our standard way of communicating on the identity and state of the selected tab. It's up to the user to either write a css rule that contains one of these two classes, or manually add some other class at an appropriate time. - Richard On Mon, Dec 7, 2009 at 1:26 AM, Donny Kurnia donnykur...@gmail.comwrote: It's have been a long time since I use jQuery UI tabs in my project. My client want dragable function, so I use this opportunity to upgrade all jquery ui. However, I notice one page got broken, because now the class used for selected tab is hardcoded in the ui.tabs.js I search the ticket and found this: http://dev.jqueryui.com/ticket/3691 I just wonder, what the decision to remove the option and use hardcoded class instead? As I know, using hardcoded constant will lead to hard to maintenance code and might result in an inconsistence. Whatever the decision, I want to thanks to all jQuery developer and jQuery UI contributor. -- Donny Kurnia http://blog.abifathir.com http://hantulab.blogspot.com http://www.plurk.com/user/donnykurnia
Re: [jQuery] Conflict at function data() of jquery 1.3.2 library and ui.core.js
What exactly is the problem? - Richard On Thu, Dec 10, 2009 at 2:58 AM, cogitovn cogit...@gmail.com wrote: Dear all, I use both libraries: jQuery 1.3.2 and ui.core, ui.slider. Besides, plugin (jquery) tool.tooltip (http://flowplayer.org/tools/ tooltip.html http://flowplayer.org/tools/%0Atooltip.html) is also in use. At 2 different locations of the site, I call tooltip() function. The first, tooltip() call to $.data() of jQuery, line 1368 in jquery.js But at other, tooltip() call to $.fn[name], line 225 in ui.core.js Althougt, both include these libraries concurrently, in the same order. I don’t know why. Please help me for useful information. Thank you very much!
Re: [jQuery] Re: jquery numeric spinner and jqueryui tabs
You may want to bring this up on the jQuery UI list http://groups.google.com/group/jquery-ui A live sample page would help. If you don't have a place to host one, use jsbin.com:: http://jsbin.com/ - Richard On Thu, Dec 10, 2009 at 10:15 AM, Jason Meckley jasonmeck...@gmail.comwrote: Richard, thank you, but that didn't work. for the same reasons as before. if I try to reload the tab I am viewing then it doesn't work. I dug around some and found 1. why this is happening 2. a hack to make it work. 1. if I attempt to selected the selected tab and collapsible is false the operation is doesn't fire (aborted?). 2. if I select the selected tab and collapsible is true the tab is minimized. 3. the spinner is calculating hieght/width/margin when spinner() is called to aline the icons to the textbox. it's using element.outerHeight() and element.outerWidth() as part of the calculation. 4. it seems that the panel's content is appended to the browser DOM after load but before show. this is why the spinner formats work in the call to show, not load. does that make sense? hacks: 1. Hidden hack tab div class=tabs ul lia href=page1.htmtab 1/a/li lia href=page2.htmtab 1/a/li li style=display:none;a href=#HACKnbps;/a/li /ul div id=HACK style=display:none;/div /div var HIDDEN_TAB_INDEX = $(.tabs).(option, length)-1; var tabs = $(.tabs); var index = tabs.tabs(option, selected); tabs .tabs(url, index, url) .tabs(select, HIDDEN_TAB_INDEX) .tabs(select, index); this works, but causes a flash as you will see the panel shrink and expand. 2. Collapsible hack div class=tabs ul lia href=page1.htmtab 1/a/li lia href=page2.htmtab 1/a/li /ul /div $(.tabs).tabs({collapsible:true}); var tabs = $(.tabs); var index = tabs.tabs(option, selected); tabs .tabs(url, index, url) .tabs(select, index) //collapse .tabs(select, index); //expand which again produces a flash with the shrinking/expanding. it also means the user can collapse any tab, which I don't want. 3. Hard code the style values. $(.tabs).tabs({ load: function(event, ui){ $(.spinner, ui.panel).spinner().find(.ui-spinner- buttons).css({hard coded values}); } }); I like that I don't get a flash but it's also dependent on the styling of the input box not changing. if it does then I have to change my script. right now I'm leaning towards option 3 since it's not used in that many places. I'm wondering... is there an event I can bind to that say after the textbox (or entire ajax content) is attached to the browser DOM (or after the content is attached to a parent), process the spinner? $(function(){$(.spinner).spinner();}); doesn't work when placed within the ajax content itself. it produces the same results as calling spinner in the load event. the outerHeight/Width are 0. On Dec 10, 6:29 am, Richard D. Worth rdwo...@gmail.com wrote: On Wed, Dec 9, 2009 at 4:52 PM, Jason Meckley jasonmeck...@gmail.com wrote: it appears that calling load programatically (rather than clicking on the tab manually) does not call the show function. In that case, you might try .triggerHandler('click') - Richard
Re: [jQuery] AND OR Expression
Convert with parseInt and then compare int to int instead of strings https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Functions/ParseInt - Richard On Thu, Dec 10, 2009 at 12:26 PM, evanbu...@gmail.com evanbu...@gmail.comwrote: I having trouble with this line if (td4th.text() '4') || (td4th.text() '2' (activeCEO == 'Yes')) In plain English, I want it to be true if td4th 4 OR td4th 2 AND activeCEo = 'Yes' Thanks $('#tblBoardDirectors tr').each(function() { var relStatus = ($('td:nth-child(5)', $(this)).text()) var activeCEO = ($('td:nth-child(12)', $(this)).text ()); { if (relStatus != 'Retired') { var td4th = $('td:nth-child(4)', $ (this)); if (td4th.text() '4') || (td4th.text() '2' (activeCEO == 'Yes')) td3rd.addClass(bgColor); } } });
Re: [jQuery] Re: AND OR Expression
var tdval = parseInt(td4th.text(), 10); //base 10 if ( (tdval 4) || (tdval 2 activeCEO == 'Yes') ) - Richard On Thu, Dec 10, 2009 at 3:26 PM, evanbu...@gmail.com evanbu...@gmail.comwrote: If I knew what I was doing, why would I be asking for help? I already know what doesn't work. That's why I posted the question. Is this right? if parseInt((td4th.text() 4)) || (parseInt((td4th.text())) 2 (activeCEO == 'Yes')) On Dec 10, 2:46 pm, MorningZ morni...@gmail.com wrote: This isn't working out for me Expecting it to? First post you were comparing: string string... which isn't going to work Follow up post after blowing right over Richard's suggestion, you are comparing string number, which *still* isn't going to work... and this line doesn't make any sense var td4th = parseInt($('td:nth-child(4)', jQuery (this))); as you are parseInt-ing a jQuery object On Dec 10, 2:36 pm, evanbu...@gmail.com evanbu...@gmail.com wrote: This isn't working out for me var td4th = parseInt($('td:nth-child(4)', jQuery (this))); if (td4th.text() 4) || ((td4th.text() 2 (activeCEO == 'Yes')) td4th.addClass(bgColor); If I do this, it works if (td4th.text() 4) td4th.addClass(bgColor); but once I add the rest beyond the || operator it doesn't. On Dec 10, 1:29 pm, Richard D. Worth rdwo...@gmail.com wrote: Convert with parseInt and then compare int to int instead of strings https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global... - Richard On Thu, Dec 10, 2009 at 12:26 PM, evanbu...@gmail.com evanbu...@gmail.comwrote: I having trouble with this line if (td4th.text() '4') || (td4th.text() '2' (activeCEO == 'Yes')) In plain English, I want it to be true if td4th 4 OR td4th 2 AND activeCEo = 'Yes' Thanks $('#tblBoardDirectors tr').each(function() { var relStatus = ($('td:nth-child(5)', $(this)).text()) var activeCEO = ($('td:nth-child(12)', $(this)).text ()); { if (relStatus != 'Retired') { var td4th = $('td:nth-child(4)', $ (this)); if (td4th.text() '4') || (td4th.text() '2' (activeCEO == 'Yes')) td3rd.addClass(bgColor); } } });- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text -
Re: [jQuery] Re: .trigger and .triggerHandler methods
Could you share a live sample page? If you don't have a place to host one, jsbin.com: http://jsbin.com/ That will allows us to see what you're seeing quite easily. - Richard On Wed, Dec 9, 2009 at 9:23 AM, T.J. theimmortal...@gmail.com wrote: For further clarification, the way I'm calling that is as follows: for (var x = 1; x = count; x++) { $(#button).triggerHandler(click); } which is inside of a function that I call on page load, and it isn't working at all. Thanks, T.J. On Dec 8, 1:32 pm, T.J. theimmortal...@gmail.com wrote: Hi all, I have a click event bound to a button that I'm needing to call without any user interaction on the button. I'm using the fragment portion of the URL to determine how many times the button's click function needs to fire and using a for loop to (attempt to, at least) trigger the click. I've tried this with .click(), .trigger(click), and .triggerHandler(click) but with no success. I could write a JavaScript function and call that within the loop, but that's unnecessary code.. Is what I'm doing valid, or can the .trigger/.triggerHandler methods not be called from within a loop? The syntax I'm using is as follows: $(#button).triggerHandler(click); Thanks, T.J.
Re: [jQuery] Re: .trigger and .triggerHandler methods
You're calling the function before binding the click handler. Change checkState(#nbl=3); $(#test).click(function(){ alert(You clicked #test!); }); to $(#test).click(function(){ alert(You clicked #test!); }); checkState(#nbl=3); - Richard On Wed, Dec 9, 2009 at 9:56 AM, T.J. theimmortal...@gmail.com wrote: Thanks for the link; I haven't heard of that site before. http://jsbin.com/axuwi3 is my (very basic) example of what I'm trying to attempt. What the button on my page actually does is quite different, and if you need that then let me know. On Dec 9, 8:29 am, Richard D. Worth rdwo...@gmail.com wrote: Could you share a live sample page? If you don't have a place to host one, jsbin.com: http://jsbin.com/ That will allows us to see what you're seeing quite easily. - Richard On Wed, Dec 9, 2009 at 9:23 AM, T.J. theimmortal...@gmail.com wrote: For further clarification, the way I'm calling that is as follows: for (var x = 1; x = count; x++) { $(#button).triggerHandler(click); } which is inside of a function that I call on page load, and it isn't working at all. Thanks, T.J. On Dec 8, 1:32 pm, T.J. theimmortal...@gmail.com wrote: Hi all, I have a click event bound to a button that I'm needing to call without any user interaction on the button. I'm using the fragment portion of the URL to determine how many times the button's click function needs to fire and using a for loop to (attempt to, at least) trigger the click. I've tried this with .click(), .trigger(click), and .triggerHandler(click) but with no success. I could write a JavaScript function and call that within the loop, but that's unnecessary code.. Is what I'm doing valid, or can the .trigger/.triggerHandler methods not be called from within a loop? The syntax I'm using is as follows: $(#button).triggerHandler(click); Thanks, T.J.
Re: [jQuery] Re: .trigger and .triggerHandler methods
I'm glad it helped! - Richard On Wed, Dec 9, 2009 at 10:05 AM, T.J. theimmortal...@gmail.com wrote: You know what, I just think I fixed my own problem. The function call is executed before I bind the click event to the button, which means that it has no event to trigger yet. Two days I've spent wondering about this, and only saw it because of far, far fewer lines of code on that example page. Thanks! T.J. On Dec 9, 8:56 am, T.J. theimmortal...@gmail.com wrote: Thanks for the link; I haven't heard of that site before. http://jsbin.com/axuwi3is my (very basic) example of what I'm trying to attempt. What the button on my page actually does is quite different, and if you need that then let me know. On Dec 9, 8:29 am, Richard D. Worth rdwo...@gmail.com wrote: Could you share a live sample page? If you don't have a place to host one, jsbin.com: http://jsbin.com/ That will allows us to see what you're seeing quite easily. - Richard On Wed, Dec 9, 2009 at 9:23 AM, T.J. theimmortal...@gmail.com wrote: For further clarification, the way I'm calling that is as follows: for (var x = 1; x = count; x++) { $(#button).triggerHandler(click); } which is inside of a function that I call on page load, and it isn't working at all. Thanks, T.J. On Dec 8, 1:32 pm, T.J. theimmortal...@gmail.com wrote: Hi all, I have a click event bound to a button that I'm needing to call without any user interaction on the button. I'm using the fragment portion of the URL to determine how many times the button's click function needs to fire and using a for loop to (attempt to, at least) trigger the click. I've tried this with .click(), .trigger(click), and .triggerHandler(click) but with no success. I could write a JavaScript function and call that within the loop, but that's unnecessary code.. Is what I'm doing valid, or can the .trigger/.triggerHandler methods not be called from within a loop? The syntax I'm using is as follows: $(#button).triggerHandler(click); Thanks, T.J.
Re: [jQuery] How do I write an express to access all radio button elements?
$(':radio') http://docs.jquery.com/Selectors/radio - Richard On Wed, Dec 9, 2009 at 10:41 AM, Dhruva Sagar dhruva.sa...@gmail.comwrote: $('input[type=radio]') Thanks Regards, Dhruva Sagar. On Wed, Dec 9, 2009 at 9:03 PM, laredotorn...@zipmail.com laredotorn...@zipmail.com wrote: Hi, I'm trying to access all radio button elements with this expression .. var expr = $(element[type='radio']); but the experts among you know this isn't correct. What is the correct expression? Thanks, - Dave
Re: [jQuery] ui-accordion page is not working in Firefox
Any chance you've fixed it since you sent your email? Caus it looks fine to me in Firefox 3.5.5. If it's still giving you problems, perhaps clear your cache, disable all add-ons (including Firebug), inspect with Firebug (after you've ruled out all add-ons and re-enabled it). - Richard On Tue, Dec 8, 2009 at 8:48 AM, al...@ourlaughingplace.com al...@ourlaughingplace.com wrote: I have a page using UI-Accordion which has been up for a few months. I just discovered that it is not working right on firefox 3.5.5, the entire accordion is compressed into one fat line. This page works fine in all other browsers, Chrome, IE8, IE6, Safari 4, Opera. I have other pages on same website which use ui-accordion and they work fine in Firefox, using the same jQuery file set. Here is a link to the page: http://www.ourlaughingplace.com/aspx/dining.aspx This is an asp.net, C# code. Accordion code looks like this, content is filled in by back end script: div id=accordion style=width:580px h1a href='#'Magic Kingdom/a/h1 div asp:Label id=MKRest runat=server/asp:Label /div h1a href='#'Epcot/a/h1 div asp:Label id=EpcotRest runat=server/asp:Label /div h1a href='#'Disney's Hollywood Studios/a/h1 div asp:Label id=MGMRest runat=server/asp:Label /div h1a href='#'Animal Kingdom/a/h1 div asp:Label id=AKRest runat=server/asp:Label /div h1a href='#'Downtown Disney (Florida)/a/h1 div asp:Label id=DTDRest runat=server/asp:Label /div h1a href='#'Walt Disney Worldreg; Resorts/a/h1 div div id=WDWaccordion style=width:570px h1a href='#'Disney's Animal Kingdom Lodge Villas/ a/h1 div asp:Label id=AKLRest runat=server/asp:Label /div h1a href='#'Disney's Yacht Club Resort, Beach Club Resort Villas/a/h1 div asp:Label id=BCRest runat=server/asp:Label /div h1a href='#'Disney's Boardwalk Inn Villas/a/h1 div asp:Label id=BWRest runat=server/asp:Label /div h1a href='#'Contemporary Resort Bay Lake Towers/a/ h1 div asp:Label id=CRest runat=server/asp:Label /div h1a href='#'Dolphin Swan Resorts/a/h1 div asp:Label id=SwanRest runat=server/asp:Label /div h1a href='#'Disney's Grand Floridian Resort Spa/a/ h1 div asp:Label id=GFRest runat=server/asp:Label /div h1a href='#'Polynesian Resort/a/h1 div asp:Label id=PRest runat=server/asp:Label /div h1a href='#'Wilderness Lodge Villas/a/h1 div asp:Label id=WLRest runat=server/asp:Label /div h1a href='#'Caribbean, Coronado, Port Orleans Resorts/ a/h1 div asp:Label id=ModRest runat=server/asp:Label /div h1a href='#'Fort Wilderness Resort Campground/a/ h1 div asp:Label id=FWRest runat=server/asp:Label /div h1a href='#'Old Key West, Saratoga Springs/a/h1 div asp:Label id=OKWRest runat=server/asp:Label /div h1a href='#'Pop Century, All-Star Music, Movies, Sports/a/h1 div asp:Label id=ASRest runat=server/asp:Label /div /div asp:Label id=WDWResortRest runat=server/asp:Label /div h1a href='#'Walt Disney Worldreg; Other/a/h1 div asp:Label id=WDWOther runat=server/asp:Label /div h1a href='#'Disneyland Park/a/h1 divasp:Label id=DLRest runat=server/asp:Label /div h1a href='#'Disney's California Adventure/a/h1 divasp:Label id=CARest runat=server/asp:Label /div h1a href='#'Downtown Disney District (California)/a/h1 div asp:Label id=DDDRest runat=server/asp:Label /div h1a href='#'Disneyland Resorts/a/h1 div asp:Label id=DLResortRest runat=server/asp:Label /div h1a href='#'Disney Magicreg;/a/h1 div asp:Label id=MagRest runat=server/asp:Label /div h1a href='#'Disney Wonderreg;/a/h1 div asp:Label id=WonRest runat=server/asp:Label /div h1a href='#'Vero Beach/a/h1 div asp:Label id=VeroRest runat=server/asp:Label /div /div Help!
Re: [jQuery] Re: Remove css attribute from the DOM element
On Sun, Dec 6, 2009 at 9:19 PM, Joshua Partogi joshua.part...@gmail.comwrote: On Dec 7, 12:36 pm, evanbu...@gmail.com evanbu...@gmail.com wrote: I like to use the addClass method rather than embed CSS in my js code. I find it easier to maintain. $('td').addClass('myCSSClass'); $('td').removeClass('myCSSClass'); Hi Evan, I'd prefer that approach too. But the problem is this css attribute value is stored in the database. I can not find the doc on how to add an extra css attribute to a css class. See http://flesler.blogspot.com/2007/11/jqueryrule.html - Richard
Re: [jQuery] Is possible to update two div with the same load?
I think you're better of with $.get and then doing the finding and loading into both divs yourself. - Richard On Fri, Dec 4, 2009 at 5:21 AM, NMarcu marcu.nico...@gmail.com wrote: Hi, I need to update a div that contain a table, and another one that contain a drop down list, that is build depending on what is in one table from db(the first div depend on this also). It's possible to update the 2 divs with the same load, or need to use two load. I try this but not worked correct. Thanks.
Re: [jQuery] javascript variable scope
Cool, huh? This is one of the beauties and real powers of the JavaScript language. It's called a closure: https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Working_with_Closures - Richard On Fri, Dec 4, 2009 at 6:46 PM, cmonahan cmona...@yahoo.com wrote: This surprised me. I made the scenario as simple as possible. http://jsbin.com/eyopo3/edit You can see in function g() I change the value of the variable i after having used it. That may seem like a useless thing to do, but in the production code I was working on, i was a loop iterator. -- View this message in context: http://old.nabble.com/javascript-variable-scope-tp26648745s27240p26648745.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] About selectable
This isn't a built-in feature. I have an idea or two about how you might do this. What's the use case? Oh, and please start a new thread on the jQuery UI list: http://groups.google.com/group/jquery-ui Thanks. - Richard On Tue, Dec 1, 2009 at 4:57 AM, Catta cat...@hotmail.com wrote: Hi Im have create an selectable divs and now i have an question if its possible to have a max select limit on this. And i have been reading and done as they have done at: http://jqueryui.com/demos/selectable/ http://jqueryui.com/demos/selectable/ So if there is any one, who can give me a tip or a link where i can read about this, I would be very glad. Thanks! -- View this message in context: http://old.nabble.com/About-selectable-tp26588114s27240p26588114.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Cookie in JQuery. Create, Update and Get
See http://plugins.jquery.com/project/cookie - Richard On Tue, Dec 1, 2009 at 9:55 PM, shapper mdmo...@gmail.com wrote: Hello, I need to add a cookie with value true or false. If the cookie does not exist then created. Otherwise change its value to the new value. Later I need to get the cookie value. Can I do this with JQuery? Do I need a plugin? Which one? Thank You, Miguel
Re: [jQuery] looping through elements with jQuery based on class
On Tue, Dec 1, 2009 at 9:53 PM, led l.r@sapo.pt wrote: I'm try to use star rating plugin frm http://fyneworks.com/jquery/star-rating/. I need to add class 'star-rating-on' on the divs with class 'star- rating rater-0 auto-submit-star star-rating-applied star-rating- live' . That's not a class, it's five classes. Spaces in a class attribute value separate multiple class names. I can use: $(div.star-rating rater-0 auto-submit-star star-rating-applied star- rating-live) that selector is looking for all elements of type star-rating-live within an element of type star-rating-applied within an element of type auto-submit-star within an element of type rater-0 within an element of type div with a class of star-rating. In this case the space acts as a descendant selector. That would only do if your markup looked something like this div class=star-rating rater-0 auto-submit-star star-rating-applied star-rating-live /star-rating-live /star-rating-applied /auto-submit-star /rater-0 /div and it would match the star-rating-live element, not the div. .each(function(){ $(this).addClass('star-rating- on') }); but it isn't working. If you really only want the divs with all those classes: $('div.star-rating').filter('.rater-0').filter('.auto-submit-star').filter('.star-rating-applied').filter('.star-rating-live').addClass('star-rating-on'); or more succinctly: $('div.star-rating.rater-0.auto-submit-star.star-rating-applied.star-rating-live').addClass('star-rating-on'); - Richard
Re: [jQuery] Re: looping through elements with jQuery based on class
See http://docs.jquery.com/Traversing/slice#startend - Richard On Tue, Dec 1, 2009 at 11:07 PM, led l.r@sapo.pt wrote: Thank you Richard. But what about to to use the example with only the first 3 '$ ('div.star-rating.rater-0.auto-submit-star.star-rating-applied.star- rating-live')' in page. Is that i need to show the results of the rating. if the result is 3 then add the class to only the first 3 stars. On 2 dez, 03:21, Richard D. Worth rdwo...@gmail.com wrote: On Tue, Dec 1, 2009 at 9:53 PM, led l.r@sapo.pt wrote: I'm try to use star rating plugin frm http://fyneworks.com/jquery/star-rating/. I need to add class 'star-rating-on' on the divs with class 'star- rating rater-0 auto-submit-star star-rating-applied star-rating- live' . That's not a class, it's five classes. Spaces in a class attribute value separate multiple class names. I can use: $(div.star-rating rater-0 auto-submit-star star-rating-applied star- rating-live) that selector is looking for all elements of type star-rating-live within an element of type star-rating-applied within an element of type auto-submit-star within an element of type rater-0 within an element of type div with a class of star-rating. In this case the space acts as a descendant selector. That would only do if your markup looked something like this div class=star-rating rater-0 auto-submit-star star-rating-applied star-rating-live /star-rating-live /star-rating-applied /auto-submit-star /rater-0 /div and it would match the star-rating-live element, not the div. .each(function(){ $(this).addClass('star-rating- on') }); but it isn't working. If you really only want the divs with all those classes: $('div.star-rating').filter('.rater-0').filter('.auto-submit-star').filter('.star-rating-applied').filter('.star-rating-live').addClass('star-rating-on'); or more succinctly: $('div.star-rating.rater-0.auto-submit-star.star-rating-applied.star-rating-live').addClass('star-rating-on'); - Richard
Re: [jQuery] slideToggle Functions
Each of the methods you mention accept (optionally) a single callback function as a final argument. Neither accept more than one. See: http://docs.jquery.com/Effects/toggle#speedcallback http://docs.jquery.com/Effects/slideToggle#speedcallback If you want to do something different in one case as opposed to another, check whether the element is visible and then call the appropriate animation method to show or hide, along with anything else you want to do at the same time. Or call the toggle or slideToggle, and put your if inside the single callback, like so: $('#my-element').click(function() { var wasHidden = $('#list-element').is(':hidden'); $('#list-element').slideToggle(200, function(){ if (wasHidden) { $('#status-element').html('show artist index'); console.log('show'); } else { $('#status-element').html('hide artist index'); console.log('hide'); } }); }); - Richard On Mon, Nov 30, 2009 at 1:39 PM, Gavin failed...@gmail.com wrote: I have a simple bit of jQuery that I just can't get working. $('#my-element').click(function(){ $('#list-element').slideToggle(function(){ $('#status-element').html('show artist index'); console.log('show'); },function(){ $('#status-element').html('hide artist index'); console.log('hide'); } ); }); Right? Simple? I've had it working before, but whenever the element is clicked, the element toggles but the console prints 'hide' every time and the #status-element never gets changed. I have also tried just using toggle() instead of slideToggle and also slideToggle(200,function(){... (including the speed before the callback functions). Any ideas would be appreciated! Thanks, Gavin
Re: [jQuery] Re: Cancel Selected An Item of Selectable
This is not currently supported. You can track progress here: http://dev.jqueryui.com/ticket/4205 - Richard On Wed, Nov 25, 2009 at 9:59 PM, He Jun-Jie junjie...@hp.com wrote: Thank you for replying my question. My situation is very easy I just want to ask whether the jQuery ui selectable provides a way to unselected one item by doing ctrl+click. Here is the sample: http://jsbin.com/ujile On 11月25日, 上午11时59分, Richard D. Worth rdwo...@gmail.com wrote: We'd be happy to help you over here: http://groups.google.com/group/jquery-ui http://groups.google.com/group/jquery-uiPlease post a live sample page showing the problem. If you don't have a way to host one, please create one on jsbin.com: http://jsbin.com/ - Richard On Tue, Nov 24, 2009 at 12:56 AM, I'm Jack junjie...@hp.com wrote: I used jQuery ui selectable function on my web page. So long it works fine, but I find a problem that if we’ve already selected some items, and I want to cancel selected one item of them, how could we do? I try to bind a click function to the elements to remove the style of ui- selected, but it doesn’t work at all. It’s so strange. Guys, could you help me in some way?- 隐藏被引用文字 - - 显示引用的文字 -
Re: [jQuery] jQuery Slider - disable keyboard control
I don't recommend it, as it's there for accessibility. However, if you must, add your own handle manually with no href: div id=slider a class=ui-slider-handle/a /div If you have any more questions about it, please ask on the jQuery UI list: http://groups.google.com/group/jquery-ui - Richard On Thu, Nov 26, 2009 at 10:51 AM, akitainu27 akita_inu_...@yahoo.comwrote: Can slider keyboard control be disabled for good without disabling the slider? Thanks. -- View this message in context: http://old.nabble.com/jQuery-Slider---disable-keyboard-control-tp26531343s27240p26531343.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Extract tag element and closing tag
See http://github.com/brandonaaron/jquery-outerhtml Here's the spoiler: alert( $('div/div').append( $(this).clone() ).html() ); - Richard On Wed, Nov 25, 2009 at 8:14 AM, coldwired co...@coolwired.net wrote: Hi, I've got the following piece of code that extracts the html code contained within a clicked element: $(p,h1,h2,h3,span,li, dd, dt,b,em,strong).click(function() { alert($(this).html()); }); I want to get the containing element from this too, it's open and close tag. For example: div id=test-div h1text in stronghere/strong/h1 /div The above code would return h1text in stronghere/strong/h1 - how can I return the div tag and it's attributes too? Thanks, Colin. -- View this message in context: http://old.nabble.com/Extract-tag-element-and-closing-tag-tp26512422s27240p26512422.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Problem with slider if else. Please help.
On Wed, Nov 25, 2009 at 1:18 AM, Morgan morganma...@gmail.com wrote: Hi, I'm a jquery novice and am trying to get a simple cost slider to work the way I want with no luck. I've used this as my foundation and modified it so that the cost is set behind the scenes and not entered by the user - http://design-notes.info/demo/cost/costestimator.html . How I would like it to work: I want the default starting point to be $200 / 1 page. As the person slides to the right the page step should increase by one and the cost should increase by $150 up to a max of $3050 / 20 pages like this: $200 / 1 page $350 / 2 pages $500 / 3 pages Sounds like you want $50 + (number of pages * $150). No? - Richard
Re: [jQuery] is there a good way to open show an iframe in a jQuery dialog window?
If by jquery dialog window you mean jQuery UI Dialog, please ask here: http://groups.google.com/group/jquery-ui If you mean another plugin, please specify which one. Thanks. - Richard On Tue, Nov 24, 2009 at 7:32 PM, thisisvlad nab...@thisisvlad.com wrote: i want to use a jquery dialog window to show an iframe. i am running into all sorts of issues. first off, i want the dialog to only show when the iframe is loaded. i tried to create the iframe w/ visibility set to hidden, and then do a .dialog() on it, but apparent jquery appends the iframe to the dom at this point, and thus the iframe is reloaded, and we have to wait. also, when i close the dialog, jquery appends the iframe again, which means the iframe is getting reloaded all over again, which wastes resources on my sever etc. is there a clean way to do this? -- View this message in context: http://old.nabble.com/is-there-a-good-way-to-open-show-an-iframe-in-a-jQuery-dialog-window--tp26505706s27240p26505706.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Cancel Selected An Item of Selectable
We'd be happy to help you over here: http://groups.google.com/group/jquery-ui http://groups.google.com/group/jquery-uiPlease post a live sample page showing the problem. If you don't have a way to host one, please create one on jsbin.com: http://jsbin.com/ - Richard On Tue, Nov 24, 2009 at 12:56 AM, I'm Jack junjie...@hp.com wrote: I used jQuery ui selectable function on my web page. So long it works fine, but I find a problem that if we’ve already selected some items, and I want to cancel selected one item of them, how could we do? I try to bind a click function to the elements to remove the style of ui- selected, but it doesn’t work at all. It’s so strange. Guys, could you help me in some way?
Re: [jQuery] Re: is this legal acording to the jQuery licence
See http://groups.google.com/group/jquery-en/browse_thread/thread/2ab7ba203fc3267f - Richard On Mon, Nov 23, 2009 at 5:52 AM, Dimitar dimitar.vel...@gmail.com wrote: Can anyone answer on this? On Nov 19, 4:11 pm, Dimitar Velkov dimitar.vel...@gmail.com wrote: Hello, I need to use jQuery lib in a script that will be included in my clients sites. My script will be included last in the body of a html page, and jQuery lib will be included dynamically from my script. Can anyone tell me is this going to have conflict with older jQuery libraries and with other libraries. If it's going to have conflict can someone tell me hot to solve it. I have made some modification on jquery, can someone tell me if this is legal according to the jQuery license. Here is the changes they are on the beginning of the script: (function(){ var // Will speed up references to window, and allows munging its name. window = this, // Will speed up references to undefined, and allows munging its name. undefined, // Map over jQuery in case of overwrite _jQuery = window.AR_jQuery, // Map over the $ in case of overwrite _$ = window.AR_jQuery, jQuery = window.AR_jQuery = function( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context ); }, I'll wait for response. Thanks -- Dimitar Velkov
Re: [jQuery] dialog partial content not visible in IE7
Please post this question to the jQuery UI list: http://groups.google.com/group/jquery-ui http://groups.google.com/group/jquery-uiAlso, it would help if you could reduce this to a minimal test page that reproduces the issue. Thanks. - Richard On Sat, Nov 21, 2009 at 9:23 PM, Bill wcma...@gmail.com wrote: I have a jQuery dialog where some of the content does not display initially in IE7. When I mouse over the dialog, the content appears. This problem does not seem to occur in IE8 or other browsers (FF, Safari, Chrome). He is a link to the (test) site. If you click on the login link in IE7, three links at the bottom of the dialog will not appear. https://exdev.ucx.ucr.edu/enroll/catalog/olr_catalog_main.php I cannot find any reason this is occurring. Have tried several things to make them appear (set focus, do a show on the containing div, etc.), but nothing seems to work. Any help or ideas would be greatly appreciated. Bill
Re: [jQuery] JQuery Dialog, bug when page loading?
Try this http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content - Richard On Thu, Nov 19, 2009 at 2:48 AM, Nicu Marcu marcu.nico...@gmail.com wrote: Very good solution, working OK. I try to do something like this on tabs, but tabs are hidden permanently. On page loading, tabs are display for a few sec, without being organize in tabs. How can I resolve this bug with tabs? 2009/11/18 Richard D. Worth rdwo...@gmail.com Hide the dialog in the html by putting it in a hidden container, or putting style=display:none; on the element itself. When you call .dialog('open') that attribute will be removed. - Richard On Wed, Nov 18, 2009 at 4:20 AM, NMarcu marcu.nico...@gmail.com wrote: Hello all, I have a question, I'm not sure if is a Dialog bug or I do something wrong. When page is loading(at the beginning). I can see for a short time(approx 1 sec) the component of the Dialog. If I use a confirmation Dialog, with the question: Are you sure?, I get this messages on the page body on page loading. This goes out after 1 sec, but this is not acceptable. -- All the best, Nicolae MARCU
Re: [jQuery] JQuery Dialog, bug when page loading?
Hide the dialog in the html by putting it in a hidden container, or putting style=display:none; on the element itself. When you call .dialog('open') that attribute will be removed. - Richard On Wed, Nov 18, 2009 at 4:20 AM, NMarcu marcu.nico...@gmail.com wrote: Hello all, I have a question, I'm not sure if is a Dialog bug or I do something wrong. When page is loading(at the beginning). I can see for a short time(approx 1 sec) the component of the Dialog. If I use a confirmation Dialog, with the question: Are you sure?, I get this messages on the page body on page loading. This goes out after 1 sec, but this is not acceptable.
Re: [jQuery] Selectors, Escaping special Character in JQuery 1.3.2 not working as expected.
Works for me: http://jsbin.com/izoco source: http://jsbin.com/izoco/edit - Richard On Tue, Nov 17, 2009 at 4:01 AM, phil pkra...@gmail.com wrote: I just recently attempted to upgrade from jQuery 1.2.6 to jQuery 1.3.2 and it broke several web pages where my selectors are escaping special characters - the period. Here is a quick example: input type=text name=first.name id=first.name/ The selector $(#first\\.name) works in jQuery 1.2.6, but is broken in jQuery 1.3.2. Is this intentional or a is it a bug? I would be grateful if there is a workaround!
Re: [jQuery] How to implement an Excel-like UI?
Start here: http://jqueryplugins.weebly.com/jquerysheet.html - Richard On Mon, Nov 16, 2009 at 8:27 PM, sayeo87 yeosuan...@gmail.com wrote: Hi, I'm new to jQuery, and plan on doing some tutorials to get more familiar with it. But my ultimate goal is to make a UI that has somewhat similar behavior as MS Excel in the sense that you can select multiple blocks and edit single cells (I don't need any calculations though). A click-drag would highlight multiple blocks, a double-click would let you edit a single cell. Each cell will only hold a single character. The image at the end gives a better idea of what I'm trying to achieve. The questions I have are: - where would be a good place to start? (any plugins/tutorials I should look at in particular) - How well would something like this scale in jQuery if there were to be 1000s of cells, which could be dynamically added/removed? Thanks for your help! http://old.nabble.com/file/p26382940/guitartabcreator_mockup_small.jpg -- View this message in context: http://old.nabble.com/How-to-implement-an-Excel-like-UI--tp26382940s27240p26382940.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
Re: [jQuery] Jquery Boston Conference
From http://ralphwhitbeck.com/2009/09/16/jQueryConference2009Summary.aspx The jQuery Conference will now be held four times next year in Boston, London, San Francisco and Online. Any further information will be posted to the jQuery Blog, http://blog.jquery.com/ as it becomes available. - Richard On Mon, Nov 16, 2009 at 7:41 AM, ray raneeh...@gmail.com wrote: I've searched online for any posting related to a Jquery Conference in 2010. Does anyone have an idea if there will be another hosted and if so will it be in Boston; 2010?
Re: [jQuery] JQuery - how to fade and loop background style
jQuery UI effects core adds color animation and class transitions: http://jqueryui.com/demos/animate/ http://docs.jquery.com/UI/Effects/animate You can download it here: http://jqueryui.com/download just check 'Effects Core' - Richard On Tue, Nov 17, 2009 at 11:43 AM, Dan dan.loff...@gmail.com wrote: Hi All, Is there a way to fade and loop a background-color of a div element? I would like it to change every 10 seconds or so, from green to orange to purple and then loop back to green and start again. With a fade effect. I have searched high and low for a plugin, or tutorial, to no avail. Thanks. Dan
Re: [jQuery] Jquery suitable for advanced webapplication
In addition to jQuery, you may also want to look at jQuery UI, which is jQuery's official suite of interactions, widgets, effects, and theming for creating rich internet applications: http://jqueryui.com/ http://jqueryui.com/- Richard On Wed, Nov 11, 2009 at 8:39 AM, Wiemer dvotion.ad...@gmail.com wrote: Hi Everybody, Forgive me my possible bad english, if I'm rude please ignore it I didn't mean to be :) Currently we're planning the build for a highend webapplication (Saas) where everything will be javascript controlled and php + mysql on the backend. Right no I'm looking for a good javascript framework on which we can build the webapplication. I'd like to know what your experiences are when using Jquery with - multiple interface states, - lot's of php mysql exchange/activity - mvc patern I allready found out that Jquery is lovely for lot's of javascript magic in your website with a very good community. But is Jquery also suitable for building a custom framework / platform behind an advanced webapplication? Please let me know what you're experiences are and any directions for good articles or resources are allways welcome. Looking forward to your reaction! Greetings Dennis Wiemer Dvotion
Re: [jQuery] Are there any specific reason why the Jquery library returns a lot of errors in the Firefoxx error console?
There shouldn't be any errors if your application is behaving as expected. Sounds like you've got some sort of configuration problem. Perhaps you don't have the latest version of jQuery? Or you're using a plugin that hasn't been updated to work with the version of jQuery you're using? Or maybe you're performing a call that leads to an error in an event that continuously gets triggered, such as a timer or a mousemove. All guesses. Hard to do more than that without seeing some code. Please post a live page, or if you can't, reproduce on jsbin.com: http://jsbin.com/ - Richard On Wed, Nov 11, 2009 at 3:35 PM, Sune42 sun...@hotmail.com wrote: Hi Just curious. I am using the Firefox error console for my debugging and I am a bit annoyed to always see the Jquery library errors popping up all the time in the list. Are there any technical reason for why the Jquery library has so many errors? or is it not possible to get rid of them because otherwise it wouldn't work on all browsers? //Andy
Re: [jQuery] help with milkbox conflict
See http://docs.jquery.com/Using_jQuery_with_Other_Libraries http://docs.jquery.com/Using_jQuery_with_Other_Librariesand http://docs.jquery.com/Core/jQuery.noConflict http://docs.jquery.com/Core/jQuery.noConflict- Richard On Mon, Nov 9, 2009 at 8:02 AM, jessicaw1974 jessicaw1...@gmail.com wrote: Hi, I am new to this and attempting to use milkbox. It looks like jquery-1.3.2.min.js is preventing milkbox from working. I wonder if there is an obvious conflict (already documented), or if this requires more exploration. I am pasting code below. Thank you. Jessica style type=text/css @import url(css/milkbox/milkbox.css);/style script type=text/javascript src=js/mootools-1.2.3-core-yc.js/ script script type=text/javascript src=js/mootools-1.2.3.1-more.js/ script script type=text/javascript src=js/milkbox.js/script script type=text/javascript src=js/mootools-1.2.3.1-assets.js/ script link type=text/css href=2010css/jquery-ui.css rel=stylesheet / link type=text/css href=2010css/general.css rel=stylesheet / script type=text/javascript src=2010js/jquery-1.3.2.min.js/ script script type=text/javascript src=2010js/jquery- ui-1.7.2.custom.min.js/script script type=text/javascript $(function(){ // Accordion $(#accordion).accordion({ header: h3 }); // Accordion $(#accordion2).accordion({ header: h3 }); // Tabs $('#tabs').tabs(); // Tabs $('#tabs2').tabs(); // Dialog $('#dialog').dialog({ autoOpen: false, width: 600, buttons: { Ok: function() { $(this).dialog(close); }, Cancel: function() { $(this).dialog(close); } } }); // Dialog Link $('#dialog_link').click(function(){ $('#dialog').dialog('open'); return false; }); // Datepicker $('#datepicker').datepicker({ inline: true }); // Slider $('#slider').slider({ range: true, values: [17, 67] }); // Progressbar $(#progressbar).progressbar({ value: 20 }); //hover states on the static widgets $('#dialog_link, ul#icons li').hover( function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); } ); }); /script
Re: [jQuery] Re: Jquery UI Accordion Navigation
And sorry I didn't realize we're on the wrong list. If you need any more help, please start a new thread on the jQuery UI list: http://groups.google.com/group/jquery-ui Thanks. - Richard On Sat, Nov 7, 2009 at 7:21 AM, Richard D. Worth rdwo...@gmail.com wrote: It looks like you'll have to supply your own navigationFilter function: http://docs.jquery.com/UI/Accordion#option-navigationFilter The default is navigationFilter: function() { return this.href.toLowerCase() == location.href.toLowerCase(); } which is trying to match the whole url, not the end, and not just the hash - Richard On Sat, Nov 7, 2009 at 3:49 AM, mehstg1319 meh...@gmail.com wrote: Right, All out of ideas now. :-( Have changed the 1,2,3 etc to valid tokens and changed the NAME to ID. But still no luck. I sense I must be very close, but cannot work out why it does not work. Paul On Nov 6, 5:15 pm, Richard D. Worth rdwo...@gmail.com wrote: h3a name=1 class=menuLink href=#1 tabindex=-1Home/a/h3 ... h3a name=2 class=menuLink href=#2 tabindex=-1About/a/h3 ... h3a name=3 class=menuLink href=#3 tabindex=-1Portfolio/a/h3 - Richard On Fri, Nov 6, 2009 at 11:55 AM, mehstg1319 meh...@gmail.com wrote: I don't see any ID's or Names that don't start with a letter in my code. :-s P On Nov 6, 4:50 pm, Richard D. Worth rdwo...@gmail.com wrote: ID and NAME tokens must begin with a letter ([A-Za-z]) On Fri, Nov 6, 2009 at 11:39 AM, mehstg1319 meh...@gmail.com wrote: Richard, I have tried using ID's. Seems to make no difference, the navigation will still not work :-( I believe I may have the anchors slightly wrong, but cannot work out what is wrong with them. With regards to your second point about using a valid ID? I do not understand, I don't see anything wrong with the names i have used? P On Nov 6, 1:43 pm, Richard D. Worth rdwo...@gmail.com wrote: Two suggestions: 1. use id instead of name 2. use a valid id. See http://www.w3.org/TR/html4/types.html#h-6.2 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 (.). - Richard On Fri, Nov 6, 2009 at 3:00 AM, mehstg1319 meh...@gmail.com wrote: Thanks very much That has fixed that bug, silly mistake to make!! The navigation still does not work however :-( i.e. if I go to http://www.paulbraham.com/test_site/index.html#2itshouldopenon the second panel and if I go to http://www.paulbraham.com/test_site/index.html#3 it should open on the third. Any ideas what I have done wrong here? Paul On Nov 6, 1:42 am, jquery.redsqu...@googlemail.com jquery.redsqu...@googlemail.com wrote: Your click function fail is due to the fact you hook the event up outside of a doc ready block. You can either change it to use .live or move it after the accordion initialise call. On Nov 5, 2:48 pm, mehstg1319 meh...@gmail.com wrote: Hi guys I am working on the following sitehttp:// www.paulbraham.com/test_site/ and am having a few troubles with my JQuery Accordion. Basically, I have turned on Navigation, and inserted three anchors, #1, #2 and #3 for the three sections that exist. Now in theory, i could go to index.html#2 and it would load with section 2 open. This is not happening, and I cannot work out what is wrong with my code. Also, I have used the following code to update the hash on the address bar when a section is selected. This is so it is possible to bookmark the website with a certain section open. This is also not working. $(.menuLink).click(function(event){ window.location.hash=this.hash; }); If it helps, I found this tutorial, that shows it working perfectly, I just can't work out what is so different about mine!! http://www.michaeljacobdavis.com/tutorials/statesavingaccordion/state. .. Thanks in advance Paul
Re: [jQuery] How to get references to added elements
Use insertAfter() instead. See http://docs.jquery.com/Manipulation/insertAfter http://docs.jquery.com/Manipulation/insertAfter- Richard On Thu, Nov 5, 2009 at 5:50 PM, kheraud kher...@gmail.com wrote: Hello, Thank you to help me to discover jQuery. I have a very easy question but i walk around the solutions for days. //I search for sub-elements with class test of paragraphs : var elementSearched = $(p .test); //Then I add a new nodes to these elements : var returnedVar = elementSearched.after(div class=subtestHello/ div); My aim is to add handlers already present on other nodes to these new nodes. But returnedVar is not the new nodes added but the old one targetted. Then I have to search for the new nodes added to apply the handler. It is hard and if I apply the handler to a node already handled, my handler is done twice for this node. How can I have references to the nodes added with .after method ? Thank you for your help.
Re: [jQuery] Re: Slider
On Tue, Nov 3, 2009 at 12:50 PM, Luh Hooo Zer anthonynori...@gmail.comwrote: Well i guess the word value was not the right word. i have a graphic under the slider1 slider2 and slider3 that says: Low-Medium-High with 30 steps in the slider. if a visitor drags slider1 handle to Medium, and slider2 handle to Low then slider 3 moves to High for instance. Why? You've yet to state your algorithm or mathematical formula for determining the position of slider3 based on the positions of slider1 and slider2. but the way i have it programmed, slider 3 just jumps to value 30 or high when those slider1 and slider2 fit those values. here is the code: if (parseInt(slider1Value) = 11 parseInt(slider1Value) =20 parseInt(slider2Value) = 1 parseInt(slider2Value) =10) { $(#slider3).slider('option', 'value', 30); $('#infoMedPrem').hide(); $('#infoLowPrem').hide(); $('#infoHighPrem').show(); } so as you can see once the sliders fit into those two ranges, the slider3 jumps to that position... and i just cant logically think of how to make it slide, as the other two sliders are moving i think that made sense?!? I'm afraid I still don't understand the relationship you're trying to set up between these three sliders, but I'll give you an example that may help. I've created two sliders, A and B, whose values are added to determine the value of C: http://jsbin.com/avagu3 source: http://jsbin.com/avagu3/edit - Richard On Nov 2, 1:28 pm, Richard D. Worth rdwo...@gmail.com wrote: Are you adding slider1 and slider2 to get the value of slider3? In that case, why does it step at 10, 20, 30? Or perhaps you're multiplying them. Not sure since you say the value combination. Are you wanting to animate smoothly between each step even though it can't sit at any value between them? - Richard On Mon, Nov 2, 2009 at 1:24 PM, Luh Hooo Zer anthonynori...@gmail.com wrote: I have 3 sliders on one page. the value combination of slider1 and slider2 dictates the position of slider3 handle. but its not smooth... for instance, slider 1 and slider2 have 30 steps, so is pretty smooth to slide, but slider 3 i can only site to position at values 10, 20, 30 it doesnt slide like slider1 and slider2 do is there a way to say, as the sliders are sliding, to move slider3 just as smooth ast the other two?- Hide quoted text - - Show quoted text -
Re: [jQuery] Attempting to hide a div using jquery but div displays for a split second and then disappears
See http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content http://www.learningjquery.com/2008/10/1-way-to-avoid-the-flash-of-unstyled-content- Richard On Wed, Nov 4, 2009 at 10:21 AM, Newbie hjohn...@geolearning.com wrote: I am working on an accordian side navigation jquery piece and I am unable to get it to operate exactly how I want. The menu was originally designed by Roshan Bhattarai and can be viewed at http://roshanbh.com.np/2008/06/accordion-menu-using-jquery.html The original design does not degrade well since the div containing the drop down menu information is set to display:none using CSS- but another forum poster suggested that the css selector be removed and the hiding function be set in the jquery. This is the code that was added to perform this function: $(div.menu_body).hide(); The code works to some extent, however the div does appear on the page for a split second on refresh or on page load and then diseappears. I am thinking I either did something wrong, am missing something, or could put that bit of code somewhere else in the script for the div to truly be hidden until the visible header is clicked. The whole point of adding this code is so the accordian menu degrades gracefully- if there is another way for the entire menu to be viewable with javascript turned off, please detail the steps. I have downloaded the newest version of jquery. Here is the entire script for the menu. script type=text/javascript language=javascript src=/javascript/ jquery.js/script script type=text/javascript !--//-+ // Developed by Roshan Bhattarai // Visit http://roshanbh.com.np for this script and more. // This notice MUST stay intact for legal use // - $(document).ready(function() {$(div.menu_body).hide(); //slides the element with class menu_body when paragraph with class menu_head is clicked $(#firstpane p.menu_head).click(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideToggle(300).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); //slides the element with class menu_body when mouse is over the paragraph $(#secondpane p.menu_head).mouseover(function() { $(this).css({backgroundImage:url(down.png)}).next (div.menu_body).slideDown(500).siblings(div.menu_body).slideUp (slow); $(this).siblings().css({backgroundImage:url(left.png)}); }); }); /script The site is on a private server behind a firewall so I cannot share the site but I can provide as much information as possible to solve this issue. An example of that preload or flashing upon refresh of the page with this type of code is viewable on this website: http://docs.jquery.com/Effects/hide - If you view the demo where it stated Click to hide me too and continue to watch that line will refreshing the page, you will see the hidden information for a split second and then it will hide. I am wondering and trying to find a way to prevent that flash of hidden information to be viewable at all.
Re: [jQuery] Create interactive song list selector
You might take a look at the ListNav plugin: http://www.ihwy.com/Labs/jquery-listnav-plugin.aspx - Richard On Tue, Nov 3, 2009 at 7:37 AM, wshawn sh...@sanityllc.com wrote: We have a master list of hundred songs we can draw from in our database. I have already created a php / mysql / ajax (maybe not needed here) combination which populates the page with a table of a master list of items. Currently when the worship leader clicks on the name of the song it is moved to a new table, and then that list gets placed in a database and emails get sent to the appropriate people. I need the list to do a little more. Two things I can't quite wrap my head around: In the master list I would like to be able to get jquery to filter the master table by letter. i.e. songs starting with Q only with the added ability to show all again... Of course if the last song with Q was just selected the list should automatically go back to showing all. I was doing this with Ajax, but feel this is a waste as jQuery can handle this directly. After the list is in the new table I would like to be able to do something like: http://www.lukedingle.com/javascript/sortable-table-rows-with-jquery-draggable-rows/
Re: [jQuery] Create PDF from js
See http://code.google.com/p/jspdf/ - Richard On Mon, Nov 2, 2009 at 5:26 AM, m.ugues m.ug...@gmail.com wrote: Hallo all. Is there any plugin for creating custom PDF from javascript? I found this library http://www.collinssoftware.com/Pdf_Samples_1.htm but is not free. Kind regards. Massimo
Re: [jQuery] Slider
Are you adding slider1 and slider2 to get the value of slider3? In that case, why does it step at 10, 20, 30? Or perhaps you're multiplying them. Not sure since you say the value combination. Are you wanting to animate smoothly between each step even though it can't sit at any value between them? - Richard On Mon, Nov 2, 2009 at 1:24 PM, Luh Hooo Zer anthonynori...@gmail.comwrote: I have 3 sliders on one page. the value combination of slider1 and slider2 dictates the position of slider3 handle. but its not smooth... for instance, slider 1 and slider2 have 30 steps, so is pretty smooth to slide, but slider 3 i can only site to position at values 10, 20, 30 it doesnt slide like slider1 and slider2 do is there a way to say, as the sliders are sliding, to move slider3 just as smooth ast the other two?
Re: [jQuery] class toggle navigation
Try this script $(document).ready(function(){ $('a').click(function() { $(this).toggleClass('active'); showPic(this); return false; }); }); /script ... div class=img_selectorImage nbsp; ul lia class=active href=images/stoppino_tictacs_lit.jpg title=01/a/li lia href=images/stoppino_tictacs.jpg title=02/a/li lia href=images/stoppino_tictac_base1.jpg title=03/a/li lia href=images/stoppino_tictac_base2.jpg title=04/a/li /ul /div - Richard On Mon, Nov 2, 2009 at 2:48 PM, Bernard Elsmere bernard.elsm...@gmail.comwrote: Hello I'm trying to implement a minimal navigation bar using jQuery's toggleClass() function but can't seem to get it working, no matter how many tips from all you gurus out there that I follow meticulously. It's the .img_selector div at the bottom of the page: http://www.thomasrugani.com/static/designobjects/02.html I want to toggle the 'active' class for each a when it's selected, to indicate which image is showing, so after calling jQuery, in the head I've got script type=text/javascript $(document).ready(function(){ $('a').click(function () { $(this).toggleClass('active'); }); }); /script then the links, which also include the showPic function: --- div class=img_selector Image nbsp; ul lia class=active onclick=return showPic(this) href=images/ stoppino_tictacs_lit.jpg title=01/a/li lia onclick=return showPic(this) href=images/ stoppino_tictacs.jpg title=02/a/li lia onclick=return showPic(this) href=images/ stoppino_tictac_base1.jpg title=03/a/li lia onclick=return showPic(this) href=images/ stoppino_tictac_base2.jpg title=04/a/li /ul /div Can anyone see what I'm missing? Thanks in advance.. Bernard
[jQuery] Re: Can you remove styles from a certain UI
Yes. See http://www.filamentgroup.com/lab/using_multiple_jquery_ui_themes_on_a_single_page/ - Richard On Mon, Oct 26, 2009 at 6:25 PM, Luh Hooo Zer anthonynori...@gmail.comwrote: i have a jquery slider, and jquery tabs on one page i dont want the tabs to have the theme the slider does... is there a way to set the tabs to not use the theme style, on the same page as the slider?
[jQuery] Re: toggleClass with Duration
On Fri, Oct 23, 2009 at 12:02 AM, TH Lim ssh...@gmail.com wrote: Hi, I used toggleClass method to toggle the colors of my message when the user clicks a button. toggleClass() worked well if I didn't specify any duration i.e. instanteous switch from white background to red background. The problem arises when I added a duration of ,say, 2s. If the user clicked the button before the message has reached the final state (say the user clicked the button 1s after the 1st click), clicking the button will not revert the message to its original state i.e. white background. How do I fix this? !$(#console).is(:animated) $(#console).toggleClass('red', 2000); This will cause the click that occurs during the animation to do nothing, but will prevent your element from getting into a state where it can no longer be toggle with a duration. If you have any further questions about jQuery UI Effects, please post to the jQuery UI list: http://groups.google.com/group/jquery-ui Thanks. - Richard
[jQuery] Re: Synthax problem
You can set the $.ajax option async to false. See http://docs.jquery.com/Ajax/jQuery.ajax#options but note the warning: By default, all requests are sent asynchronous (i.e. this is set to true by default). If you need synchronous requests, set this option to false. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active. Because JavaScript is single-threaded, you have to choose between locking the browser (synchronous) or having your result come through a callback function, like success (asynchronous). - Richard On Thu, Oct 22, 2009 at 3:55 PM, fabbx fab.creatix...@gmail.com wrote: Hi everyone I have a problem with the use of an ajax call in a function. I want to get the result of the ajax call for processing to the return of the function. I've tried something like that function checkUsername(s) { TO_RETURN = $.ajax({ type: POST, url: 'http://'+ CURRENT_DOMAIN + '/ajax/checkUsernameExists/ username/'+s, async: false, success: function(msg){ if(msg=='true'){ return true; } else { return false; } } }); if(TO_RETURN) return true; else return false; } But it didn't work ... If anyone could help me :) PS : I'm a novice in jQuery and i have low skills in javascripts
[jQuery] Re: jquery.com plugin directory
Good news. See http://ralphwhitbeck.com/2009/09/16/jQueryConference2009Summary.aspx So what was announced at jQuery Conference regarding the jQuery project? ... 3. Announced a revamped and simplified plugin repository. This is jQuery teams number one priority and is targeted to for release by end of year. ... - Richard On Thu, Oct 22, 2009 at 7:49 PM, JMan jbeck...@gmail.com wrote: Is it just me or does anyone else have the hardest time finding plugins on the jquery.com site? jquery is an awesome library and I do not plan on using anything else anytime soon but the manner in which they catalog plugins on the site is terrible. I know these guys are capable of much better. Ok so you can choose a plugin category but then everything just runs together on that page. The content displayed for each plugin varies wildly depending on how generous the plugin developer was when they added their contribution. The plugin search seems to search through all the pages and their content and the results you get back are pretty vague at times and in many cases you get back duplicates. For example if you search for menu you may get back a bunch of links to pages that have the word menu in them but the page may not be a menu plugin. The Taxonomy is not too bad but I think they should categorize and sub categorize the plugins a little better. A great example of what is needed in the extensions directory at Joomla.com. Even if you just list the plugins more like a product catalog with a link to the main plugin page stuff would be allot easier on the eyes. I know the jquery community has alot of great code to offer but discovering it in the plugins section of jquery.com is quite painful. I am not trying to upset anyone here but jquery and it's plugin directory has outgrown the Drupal/CCK limitations.
[jQuery] Re: $.Event is not a function js/jquery/ui.core.js Line 345
How bout an old version of jQuery UI then? If you're using jQuery v1.3.2 make sure you're not using a jQuery UI version older than 1.7 - Richard On Thu, Oct 22, 2009 at 11:20 AM, Maxime FAYE maxime.f...@gmail.com wrote: Nope : jQuery JavaScript Library v1.3.2 that's what the jQuery.js file says :) 2009/10/22 Ariel Flesler afles...@gmail.com Could be that you're using an old version of jQuery (prior to 1.3.x?) On Thu, Oct 22, 2009 at 1:03 PM, Maxime FAYE maxime.f...@gmail.comwrote: Sorry no... But i can give you the code that is generting the error : var sDialogId = divPleaseActionDialog; var sDialog = ; var oButtons = {}; oButtons[aTranslations[ok]] = function(){ $j('#' + sDialogId).dialog('destroy'); }; sDialog += 'div id=' + sDialogId + '' + \n; sDialog += 'Please select at least one action'; sDialog += '/div' + \n; $j('body').append(sDialog); alert($j('#' + sDialogId).length); $j('#' + sDialogId).dialog({ modal:true, buttons:oButtons, height:300, width:500, stack:true, title:aTranslations['error'], close:function() { $j('#' + sDialogId).dialog('destroy'); } }); It seems that the error occure when jQuery launch the dialog 2009/10/22 Ariel Flesler afles...@gmail.com Can you provide a link to the page where you see this error? -- Ariel Flesler http://flesler.blogspot.com On Oct 22, 1:32 pm, Maskime maxime.f...@gmail.com wrote: Hi all, I'm having the following error when opening a dialog $.Event is not a function js/jquery/ui.core.js Line 345 I don't really understand what's happening since i'm using this code to load dialog in many places in my application an it's the first time that i'm having this problem... If any one has an idea, it's more than welcome :) Thank you in advance. -- Ariel Flesler http://flesler.blogspot.com
[jQuery] Re: newbie: test for null selection
That pretty much sums up the beauty of jQuery. :) - Richard On Thu, Oct 22, 2009 at 1:51 AM, BradW brad...@gmail.com wrote: Aha! So if I understand the implications of this, a selector always returns a wrapper object that acts like BOTH a javascript array and like a single DOM element – even though it is really neither. And this allows us to write elegant code that treats selectors as single objects, or as arrays, whether nothing or one thing or 17 things are found. Is that right? On Oct 21, 7:35 pm, Dave Methvin dave.meth...@gmail.com wrote: if ( $(#missing).length == 0 ) // it's not there However, remember that if you apply jQuery methods to an empty selection it does nothing: $(#missing).hide(); // no-op
[jQuery] Re: load vs ajax
.load() is really nice if all you're doing is loading some content into an element. It's a nice convenience method. If you're going to take the results of the ajax call and maybe put different parts of the content in different places, or do some manipulation or other munging on it before you add it to the page, then $.ajax() or $.get() will be your best bet. - Richard On Wed, Oct 21, 2009 at 10:59 AM, Hogsmill i...@hogsmill.com wrote: I've been using $.ajax() for ages, and am now developing on a site where they alwats use load(). Does anybody know which is best (if either), ans pros and cons for each one? Cheers in advance, Hogsmill
[jQuery] Re: each function not iterating
Do you have two different forms on your page, or is it one form with an id of 'testform' and a class of 'uplform'? Your code says you want to look at the inputs in the #testform, but your email says you want to look at the inputs belonging to form.uplform. If they're the same form, you can do $(this).children('input').each(... or $(this).find('input').each(... Next step would be to test the results of just that query, by something like alert($(this).children('input').length); or alert($(this).find('input').length); If that has a length, the .each(fn) should work just fine. - Richard On Wed, Oct 21, 2009 at 2:36 AM, j...@creatusadvertising.com susanprob...@goalattained.com wrote: Hi! I have this code: $(form.uplform).live('submit', function(){ if($(this).attr('validate')=='true'){ $(#testforminput).each(function(){ alert($(this).attr('name')); }); } return false; }); What I'm trying to achieve is alert all the name attributes of all input boxes belonging to form.uploform but this does not seem to happen. although i did get past if validate==true thing.. Please tell me what i am doing wrong.. Thanks in advance
[jQuery] Re: Where to access datepicker?
On Mon, Oct 19, 2009 at 2:29 PM, Andrew243 m...@andrewcampbell.us wrote: Hi Charlie, The Google link works -- thanks, I did not understand how to contruct the Google URL from their site. What URL can I use to link to datepicker? For the jQuery UI Datepicker, you'll need jQuery, jQuery UI, and a theme: script src=http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js /script script src= http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js /script link href= http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/base/jquery-ui.css; rel=stylesheet type=text/css / You can change /base/ in that last line to any of the theme names in the ThemeRoller gallery ( http://themeroller.com/ ). Here are some examples: Sunny Theme: http://jsbin.com/evanu Flick Theme: http://jsbin.com/utito Humanity Theme: http://jsbin.com/oviwa and also if you want to preview all the different themes: Themeswitcher: http://jsbin.com/ifine If you have any more questions about the jQuery UI Datepicker plugin, note there's a dedicated list for jQuery UI questions: http://groups.google.com/group/jquery-ui Thanks. - Richard
[jQuery] Re: Weird z-index problem JQuery dialog + Text field
On Mon, Oct 19, 2009 at 10:54 PM, Bi Jing beco...@gmail.com wrote: Could please provide some code fragments? Even better would be a live sample page. If you don't have a place to host one, you can use jsbin.com: http://jsbin.com/ - Richard
[jQuery] Re: easing 1.3 plugin how to implement pls?
Looking at the 'Available Options' on http://fancybox.net/howto , my guess would be one of these settings: easingIn, easingOut, easingChange Easing used for animations - Richard On Mon, Oct 19, 2009 at 8:10 AM, jessie mi...@optusnet.com.au wrote: Ok after reading a bit i know realise that i have to animate and add the motion Does anyone know how i would do this please? This is what i have for my fancybox to which i'd like to animate differently to the standard swing. jQuery(function($) { $(a.group).fancybox({ overlayShow : true });}); Thanx Jess On Oct 19, 9:23 am, jessie mi...@optusnet.com.au wrote: Hi I have fancybox lightbox installed and i wanted a different transition effect. So i've installed theeasing1.3 plugin I have read and re-read the instructions but i don't really understand where i need to make the change for it to take effect. Its all loading fine so there are no problems there. Here is the instructions.http://gsgd.co.uk/sandbox/jquery/easing/ Usage Default Choose a defaulteasingmethod to overwrite the standard 'swing' animation. Theeasingdefault is 'easeOutQuad', specify your own using the following: jQuery.easing.def = string; Where string is one of the equation names. The old swing function is renamed to jswing. U yes, and where do I make this change? And not sure I know what a string is but I thought it would be any othereasingfunction such as ‘easeInSine’ etc. no? but where exactly do I put it? am i suppose to edit the plugin or have another js file with those commands? Thanks Jess
[jQuery] Re: Jquery Simple Accordion Script (No Plugins)
Your title says (No Plugins). Are you set on not using an already built accordion plugin that has solved these issues, and more? Because you're hitting the first of many issues that previous plugin authors have hit before you. - Richard On Mon, Oct 19, 2009 at 10:06 AM, Joel typefasterj...@gmail.com wrote: Good Day, I've been working around Jquery for a little while now and I'm creating a News Accordion menu to go on my site. The accordion works fine in all browsers, however there is a bouncing effect if Click on the same news article. Here is the snippet of the first code I was working on: Code: $(.newsArticle:not(:first)).hide(); $(.newsHeader h3).click(function() { $(.newsArticle:visible).slideUp(slow); $(this).parent().next().slideDown(slow); return false; }); I played around with it for a while and I came up with the following: Code: if($(#newsAccordion)) {// IE Fix $(.newsArticle).hide(); $(.newsArticle:first).show(); $(.newsArticle:first).addClass(active); } $(.newsHeader h3).click(function() { if($(.newsArticle).hasClass(active)) { $(.newsArticle:visible).slideToggle(slow); $(.newsArticle:visible).toggleClass(active); console.log(Inside If); } else if($(.newsArticle:hidden)) { $(.newsArticle:visible).slideUp(slow, function() { $(this).parent().next().slideDown(slow); }); $(.newsArticle:visible).removeClass(active); $(this).parent().next().slideDown(slow); $(this).parent().next().addClass(active); console.log(The Other if); } }); This top code actually works with what I want it to do. To close in case the news h3 was clicked again. However, if I clicked on a closed one it closes the current one, but doesn't open the new one. The HTML Hierarchy goes as follow: Code: div id=newsAccordion div class=newsHeader h3News Header/h3 p class=dateAugust 10,2009/p /div div class=newsArticle pContent of Article/p /div /div Any help would be gladly appreciated. Thanks! :)
[jQuery] Re: Sortable: get the element that received the sortable?
On Mon, Oct 19, 2009 at 7:29 AM, Matt guitarroman...@gmail.com wrote: Anyway: is there a way that I can get the element that has received the sortable item? It could be one of three in my case, and I only want this code to be added for two of them. $(this) If you have any more questions about this plugin, please post to the jquery-ui list: http://groups.google.com/group/jquery-ui Thanks. - Richard
[jQuery] Re: How to check is the object with the css property?
Here are two options: $('div').each(function() { if ($(this).css('position') == 'absolute') { //do something with this } }); /// var $divPosAbs = $('div').filter(function() { return ($(this).css('position') == 'absolute'); }); //do something with $divPosAbs - Richard On Sat, Oct 17, 2009 at 5:33 AM, David .Wu chan1...@gmail.com wrote: div/div div style=position: absolute/div $('div').each(function() { // How to know the div have position property or not? });
[jQuery] Re: calculating value based on two sliders
Something like this perhaps: http://jsbin.com/enuxu source code: http://jsbin.com/enuxu/edit - Richard On Wed, Oct 14, 2009 at 2:28 PM, DekiR roncevic.de...@gmail.com wrote: HI, I am new to jquery and I am trying to calculate a value based on two sliders. Can somebody help me or point me into the right direction. Thanks, DekiR This is the code that I am using: var value1; var value2; $(function() { $(#slider).slider({ value:0, min: -100, max: 100, step: 1, slide: function(event, ui) { $(#amount_t).val(ui.value); var sl1 = parseFloat(ui.value / 100) * parseFloat($(#rate).attr (value)); $(#amount1_t).val(sl1); value1 = sl1; } }); $(#slider1).slider({ value:0, min: -100, max: 100, step: 1, slide: function(event, ui) { $(#amount_b).val(ui.value); var sl2 = parseFloat(ui.value / 100) * parseFloat($(#rate).attr (value)); $(#amount1_b).val(sl2); value2 = sl2; } }); var calc = parseFloat(value1) + parseFloat(value2); $(#total).val(calc); });
[jQuery] Re: calculating value based on two sliders
Oh, and if you have any future questions about jQuery UI plugins, note there's a separate list for those: http://groups.google.com/group/jquery-ui http://groups.google.com/group/jquery-ui- Richard On Fri, Oct 16, 2009 at 8:28 AM, Richard D. Worth rdwo...@gmail.com wrote: Something like this perhaps: http://jsbin.com/enuxu source code: http://jsbin.com/enuxu/edit - Richard On Wed, Oct 14, 2009 at 2:28 PM, DekiR roncevic.de...@gmail.com wrote: HI, I am new to jquery and I am trying to calculate a value based on two sliders. Can somebody help me or point me into the right direction. Thanks, DekiR This is the code that I am using: var value1; var value2; $(function() { $(#slider).slider({ value:0, min: -100, max: 100, step: 1, slide: function(event, ui) { $(#amount_t).val(ui.value); var sl1 = parseFloat(ui.value / 100) * parseFloat($(#rate).attr (value)); $(#amount1_t).val(sl1); value1 = sl1; } }); $(#slider1).slider({ value:0, min: -100, max: 100, step: 1, slide: function(event, ui) { $(#amount_b).val(ui.value); var sl2 = parseFloat(ui.value / 100) * parseFloat($(#rate).attr (value)); $(#amount1_b).val(sl2); value2 = sl2; } }); var calc = parseFloat(value1) + parseFloat(value2); $(#total).val(calc); });
[jQuery] Re: Script for tabs?
I imagine you wouldn't need any more code than Bi Jing has given you to handle even 100 tabs, since it uses classes, not IDs. - Richard On Fri, Oct 16, 2009 at 10:53 AM, lukas animod...@gmail.com wrote: Thank you for your quick response! In the meantime I tried something similar, I thought there is a solution which doesn't require that much code. (Imagine you have 10 tabs!) On Oct 16, 3:57 am, Bi Jing beco...@gmail.com wrote: Firstly, define a new css class , selected_tab , as following: //Style code .selected_tab{ background-color:#ccc; color:#000; } //Script code //$(.tab) indicate all of your tab elements. $(.tab).click(function(){ $(.selected_tab).removeClass(selected_tab); // clear current select tab style $(this).addClass(selected_tab);} ) Hope that helps. Becoder. On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote: Can anybody direct me to a lightweight jquery script controlling tabs? I just want the activated tab to appear differently than the rest of the tabs. Thank you!
[jQuery] Re: Script for tabs?
Sounds like you may want to look into using a tabs plugin, if you don't want to implement this all yourself. For example: http://jqueryui.com/demos/tabs/ http://jqueryui.com/demos/tabs/- Richard On Fri, Oct 16, 2009 at 12:58 PM, lukas animod...@gmail.com wrote: Thank you! But how do you memorize the state of the tabs? When you click a tab it will work until the refresh of the page is finished and the original mark-up is effective again. On Oct 16, 11:15 am, Richard D. Worth rdwo...@gmail.com wrote: I imagine you wouldn't need any more code than Bi Jing has given you to handle even 100 tabs, since it uses classes, not IDs. - Richard On Fri, Oct 16, 2009 at 10:53 AM, lukas animod...@gmail.com wrote: Thank you for your quick response! In the meantime I tried something similar, I thought there is a solution which doesn't require that much code. (Imagine you have 10 tabs!) On Oct 16, 3:57 am, Bi Jing beco...@gmail.com wrote: Firstly, define a new css class , selected_tab , as following: //Style code .selected_tab{ background-color:#ccc; color:#000; } //Script code //$(.tab) indicate all of your tab elements. $(.tab).click(function(){ $(.selected_tab).removeClass(selected_tab); // clear current select tab style $(this).addClass(selected_tab);} ) Hope that helps. Becoder. On Fri, Oct 16, 2009 at 11:57 AM, lukas animod...@gmail.com wrote: Can anybody direct me to a lightweight jquery script controlling tabs? I just want the activated tab to appear differently than the rest of the tabs. Thank you!
[jQuery] Re: Why no color animation built in?
Because filesize is at a premium, and not enough people (80-95%) need this feature almost every time they use jQuery (80-95%). That's the point of plugins. I wrote something on the subject some time ago, and I think it sums it up well. See http://groups.google.com/group/jquery-en/msg/0ca254effd0acd00 Also, I agree this should be in the core of jQuery. I have found the jQuery project to be quite consistent in adding plugins to the core when they are so widely used, that nearly everyone is including them along with jquery.js, so that the addition is natural and welcome. This means lots and lots of people, over a long time, and puts the onus where it should be, on the plugin author. Look at the recent addition of the dimensions plugin (most in v1.2, the rest in v1.2.5). For over a year, this has been one of the most requested plugin additions to the core. So many sites and other plugins use it, it no longer made sense for it to not be in the core. It's a model that keeps the core lean, and gives users as much a vote as to what goes into jQuery as any member of the dev team. Beautiful. In this specific instance you can either include effects.core.js from jQuery UI, which as Charlie pointed out, contains this feature, or the standalone color plugin: http://plugins.jquery.com/project/color Easy enough for anyone that needs this, and doesn't burden all the people that don't. This is just one example. There are many others, such as: (not exhaustive and in no particular order) * history * cookie * metadata * bgiframe * blockUI - Richard On Fri, Oct 16, 2009 at 2:53 PM, Sam figaro1...@gmail.com wrote: Well why don't they bundle this in with the jQuery standard library? On Oct 16, 11:21 am, Charlie charlie...@gmail.com wrote: jQueryUi has color animationshttp://jqueryui.com/demos/animate/ Sam wrote:I was just wondering, why doesn't jQuery have color animations built- in to the library? JavaScript has hexadecimal number literals (0xaabbcc), so it could be the way to define colors in the params argument object. An array literal could also be used to set colors. Why is it that jQuery hasn't implemented this by default?
[jQuery] Re: Join element sets?
Here are two options: $('.contentBox, .referencesImage').hover(fn, fn); $('.contentBox').add('.referencesImage').hover(fn, fn); - Richard On Thu, Oct 15, 2009 at 5:06 AM, Dennis Madsen den...@demaweb.dk wrote: I would like to do something like: $(.contentBox).$(.referencesImage).hover(function(event){ ..do something },function(event){ ..do something }); Where the hover-function is both for both element sets. On 15 Okt., 10:48, Dennis Madsen den...@demaweb.dk wrote: I have two element sets: $(.contentBox) and $(.referencesImage). How can I join the elements in this sets? I would like to join the sets, since I'm adding the exact same hover function on both element sets. $(.contentBox).hover(function(event){ ..do something },function(event){ ..do something }); $(.referencesImage).hover(function(event){ ..do something },function(event){ ..do something });
[jQuery] Re: Urgent problem in wordpress
data: { name: 'John', location: 'Boston' } - Richard On Thu, Oct 15, 2009 at 7:27 AM, Rupak rupakn...@gmail.com wrote: Hi all I am new to wordpress.I am using $.ajax $.ajax({ type: POST, url: some.php, data: name=Johnlocation=Boston, success: function(msg){ alert( Data Saved: + msg ); } }); But it will convert into #038. can any one tell me how to fixed this.