[jQuery] Re: dev tip: combining JS script files
My understanding is we put script tags in the head so as to not clutter up the body DOM. I don't think it has anything to do with ready(), and I'm pretty sure ready() doesn't require script tags to be in the head... Yes, but if you put the scripts at the end of the body you don't need to use ready(), e.g. that is literally the same as using ready()... So why don't we just always put script tags at the end of the body? What's the disadvantage of that? One disadvantage is that it can lead to sloppy display behavior when the page loads. The browser will never start rendering a page while the HEAD is loading. But once it starts loading the BODY, the browser is free to render a partial page any time it feels like it. In practice, this doesn't usually happen unless something causes the page loading to stall. In particular, if there is a script tag that loads an external script, the browser is very likely to render the page using whatever it has available at that point. You can see this in action on any typical newspaper site such as www.mercurynews.com. Any time you navigate to a new page, stuff jumps around all over the place while the page loads. This is caused by the script tags that are sprinkled willy-nilly throughout the page. A script tag at the very end of the body is less likely to trigger this behavior, but it could still happen if the script modifies DOM elements earlier in the page. The browser reaches the script tag, and while it waits for the external script to load it decides to render what it has so far. Then the script loads and modifies the page, so things jump around when this happens. -Mike
[jQuery] Re: ANNOUNCE: Horizontal Accordion
that's a really nice result! _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Cherne Sent: mardi 17 juillet 2007 6:13 To: jquery-en@googlegroups.com Subject: [jQuery] Re: ANNOUNCE: Horizontal Accordion A few months ago I worked the weekend on a prototype that demonstrates the appearance effect I think you're suggesting: HYPERLINK http://cherne.net/brian/resources/jquery.slidingPanels.htmlhttp://cherne.net/brian/resources/jquery.slidingPanels.html It's a little different, totally undocumented and sparsely commented as I was just coding to satisfy my inner-geek... trying to mimic the flash widget on HYPERLINK http://bmwusa.combmwusa.com Brian. On 7/16/07, Alexandre Plennevaux HYPERLINK mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: i think it's a very good start Alexander, congratz! I would personally prefer to have control of the appearance effect so that it looks more like the right-most slide is in front of its left neighbour, and the leftmost one being the most distant one (that is, with the smaller z-index). as a whole i find this to be a nice idea which was recently implemented in prototype /scriptaculous if i'm not mistaken. it would therefore be nice to have this integrated in one accordeon plugin, taking care of horizontal and vertical direction. my 2 eurocents:) _ From: HYPERLINK mailto:jquery-en@googlegroups.com; [EMAIL PROTECTED] [mailto:HYPERLINK mailto:jquery-en@googlegroups.com; [EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: lundi 16 juillet 2007 21:57 To: HYPERLINK mailto:jquery-en@googlegroups.com; [EMAIL PROTECTED] Subject: [jQuery] Re: ANNOUNCE: Horizontal Accordion Nice. On FF, I noticed that the hover-image made the whole thing disappear if you moused over too soon. Consider using a sprite image (both on and off in the same image and move the background-position, rather than 2 images). Also, I'm a huge fan of the easing plugin. Using one of the easing methods, your panels should slide with a more realistic motion. But overall, nice work! Glen On 7/16/07, Tane Piper HYPERLINK mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Very Nice! This has given me a great idea for my interface in my application - I was looking for inspiration. Can't wait to give it a go. On 7/16/07, Alexander Graef HYPERLINK mailto:[EMAIL PROTECTED] \n [EMAIL PROTECTED] wrote: Since the introduction of the blade interface on XBOX360, I have been looking for a simple way to accomplish this with javascript and css. Last week I decided to give it a try myself. As I am working actively with jQuery since its introduction, it was my library of choice. Using jQuery and some plugin magic, I succeeded. This is still a project in progress, but thought I share it and give something back to the great jQuery community :) I will be writing up a more detailed tutorial soon and add more functionality. I also have some other nice widgets I will be sharing in the future ;) HYPERLINK http://dev.portalzine.de/index?/Horizontal_Accordion--print; \nhttp://dev.portalzine.de/index?/Horizontal_Accordion--print Cheers Alexander - portalZINE(R)- innovation uncovered HYPERLINK http://www.portalzine.de; \nhttp://www.portalzine.de dev.portalZINE(R) - all about development HYPERLINK http://dev.portalzine.de; \nhttp://dev.portalzine.de pro.portalZINE (R) - customized experience HYPERLINK http://pro.portalzine.de; \nhttp://pro.portalzine.de -- Tane Piper HYPERLINK http://digitalspaghetti.tooum.net; \nhttp://digitalspaghetti.tooum.net This email is: [ ] blogable [ x ] ask first [ ] private Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.6/902 - Date: 15/07/2007 14:21 Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.8/904 - Date: 16/07/2007 17:42
[jQuery] IE takes link when firing onclick event
Hi guys, New to jquery but really loving it so far. I've done some code that seemed to work in all tested browsers, except IE The code: $(a.more).click( function(){ $(a.more).css(color,red).css(font-style,italic).css(font- weight,bold); $(dl.hidden).show(slow); return false; } I am returning false, so the default behavior should've be nullified, but IE still insists on taking the link to a non-existing page (and displays an error). any help with this matter is dearly appreciated. I will update if I find the solution. Thanks all. *QuEz*
[jQuery] Re: parsing xml
Thanks for your help. This works but I kinda brute-forced my way though. I'll see if I can implement it more clearly with this. Thanks. On Jul 15, 1:57 pm, Benjamin Sterling [EMAIL PROTECTED] wrote: Try: $('bio', this).text(); On 7/15/07, quez [EMAIL PROTECTED] wrote: Benjamin, thanks for your reply. I've started with the $.post func though like this: $.post(/ backend.php,{},function(xml){update_view(xml); } ); then: update_view(xml){ var messages = [] ; $('message', xml).each( function(i){ //go through each message $this = $(this); //jquery object. messages[i] = { bio: $this.find(bio).text(), voted:$this.end().find(voted).text() }; alert (messages[i][voted]); } }//end update_view the alert is outputting an undefined value, and not the text as I expected. I'll post a solution when I find it, but thanks very much for your help. On Jul 15, 11:04 am, Benjamin Sterling [EMAIL PROTECTED] wrote: quez, I use the $.ajax with dataType set to xml; on success I set a global variable to the contents of the xml. Once it is done, I get the info doing something like: $('response/message:eq(0)/bio', globalXML).text(); :eq(0) will grab the first message :eq(1) will grab the second one and so on. I use this technique of a few sites, http://airplume.informationexperts.com/module.htm#m-1000beingone of them. Check outhttp://airplume.informationexperts.com/common/js/core.jsand look at the loadXML function at the bottom of the page and then look at the buildPage function that is about mid-way up the page and you will see how I call everything in. On 7/14/07, quez [EMAIL PROTECTED] wrote: my xml looks something like: response message biothe bio/bio votedthe votes/voted /message message bioanother bio/bio votedlikewise, another vote/voted /message /response I'm new to jquery. I'd like to place these in an array so I can access votes/bio easily and separately. at the moment, jquery is returning it like this: the bioanother bio . Any help is much appreciated. Thanks. -- Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com -- Benjamin Sterlinghttp://www.KenzoMedia.comhttp://www.KenzoHosting.com
[jQuery] Re: strange behavior of Safari
Hi, My eternal quest for a solution to Safari FOUC may, at last, have come to an end. See http://jonaquino.blogspot.com/2007/02/workaround-for-safari-fouc-bug.html this post. The author presents a solution and commenters come up with improvements. Just tried a test of an old site that failed mainly because of FOUC in Safari and it now works well (I used Varen's solution with Jonathon's PHP code). I'm working on a jquery site at the moment and I'll try the methods to see if they work. Also, apparently Safari devs eliminated the FOUC problem in their nightly builds. See http://www.stylegala.com/news/public200608/2166.htm this post. While it doesn't help us now, at least future versions will have been fixed. Hope this is of some help. n00bert Dmitry Rudakov wrote: I'll try to describe it with my poor English... When Safari starts loading a page... It looks like page has no CSS at all and it appears in default markup (just a long list of DIVs) then Safari discovers CSS and re-renders the page in a normal way... All this leads to annoying flicks on the page. I tried to localize this problem but found only that it somehow connected with JavaScript and modifications in DOM... If anybody encountered such a strange behavior of Safari?.. Maybe this is a known problem and you could give me an advice how to avoid such a problem with Safari? I would appreciate any insight or idea concerning this case... -- View this message in context: http://www.nabble.com/strange-behavior-of-Safari-tf3148710s15494.html#a11644860 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: Stopping a $.load call
On Jul 16, 11:15 pm, batobin [EMAIL PROTECTED] wrote: Hello everyone. This is a general question about stopping (or overriding) an AJAX call once it has been made. In order to illustrate my question I can give a specific example, but I'm sure this topic is applicable to many people besides myself... I have done something similar, but i used setTimeout. So a request is not made everytime when someone is typing. Actually it's quite simple. The function refres_list() diplays the results. Hope it helps. My code looks like this: var search_timeout = false; $(#quick-search).keypress(function() { clearTimeout( search_timeout ); search_timeout = setTimeout(function() { refresh_list(); }, 300); });
[jQuery] Re: tablesorter 2.0 - Shiny Brand new documentation!
Christian Bach wrote: After many late night i have managed to sort out a documentation/FAQ, for the new 2.0 release. The new tablesorter will be released next week. It's all looking great! Thanks!
[jQuery] Re: jQuery form plugin questions
Mike thank you so much! That works perfectly, I was able to figure out how to use both methods. I went for the one you suggested, but its nice to know how to do both. This was my biggest hurdle to overcome in learning ajax, I most definitely owe you a six pack! Thanks again! -Chris On Jul 16, 5:44 pm, Mike Alsup [EMAIL PROTECTED] wrote: Chris, You can do one of two things: 1) When the form is submitted return the new comment. In other words, when the new comment is posted, return what you would return from your newcomments.php script. If you do that, your javascript would look something like this: $(document).ready(function() { $('#myForm').ajaxForm(function(newcomment) { $('#thankyou').show('slow'); $('#newcomment').hide('fast'); $('#comments h1').after(newcomment); }); }); Note that the callback function is passed the server response so if your comment.php script returns the new comment everything will fall nicely into place. This would be my preferred method since it requires only a single round trip to the server. 2) You can use $.get like you're attempting to do now, but you need to handle the response. Your $.get call is working, you're just not doing anything with the response. Try something like this: $(document).ready(function() { $('#myForm').ajaxForm(function() { $('#thankyou').show('slow'); $('#newcomment').hide('fast'); $.get('newcomments.php', function(newcomment) { $('#comments h1').after(newcomment); }); }); }); Again, note that the callback is passed the server response (the new comment). Hope this helps! Mike On 7/16/07, Chris [EMAIL PROTECTED] wrote: Thank you for the help mike, I really appreciate it! Try making a comment on our blog. http://www.iphoneappr.com/index.php?post=55 I am trying to make it so that the comment, once submitted, shows up in the list of comments. Thank you! On Jul 16, 3:22 pm, Mike Alsup [EMAIL PROTECTED] wrote: Chris, Can you put together a simplified example page. I feel like I'm only getting part of the picture. Mike On 7/16/07, Chris [EMAIL PROTECTED] wrote: Any ideas? On Jul 15, 12:07 pm, Chris [EMAIL PROTECTED] wrote: Thank you for the reply mike! I added this to my script: $(document).ready(function() { // bind 'myForm' and provide a simple callback function $('#myForm').ajaxForm(function() { $('#thankyou').show('slow'); $('#newcomment').hide('fast'); $('#newestcomment').show('slow'); }); }); and did this with the div: div id=newestcomment style=display:none; a href=#? echo $_POST[name]; ?/a? echo $_POST[comment]; ? /div It did not seem to pull the data from post, but it does add another space for a comment. The way my form is processed is it send the post info to comment.php and that adds it to the database. How do i have the jquery talk to the php. I tried using a get from an external php page that pulls the latest comment from the database but I didn't know where to go after that. Thank you! -Chris On Jul 15, 6:06 am, Mike Alsup [EMAIL PROTECTED] wrote: Sorry, I'm meant the formatted *comment*. When a comment is posted, return something like this from the server (filling in the correct info as appropriate): div class=oddcomment pa href=#author name here/a/ppComment text here/p /div Mike On 7/15/07, Chris [EMAIL PROTECTED] wrote: Thank you for the reply mike, Unfortunately I don't understand how I could use this? What is the formatted column? I think i understand that you would be running this code $('#comments h1') after the (data) for the form is complete. On Jul 13, 4:17 am, Mike Alsup [EMAIL PROTECTED] wrote: Chris, Why don't you return the formatted column when it is posted. Then you could do something like this: $(document).ready(function() { $('#myForm').ajaxForm(function(data) { $('#thankyou').show('slow'); $('newcomment').hide(); $('#comments h1').after(data); }); }); Mike On 7/13/07, Chris [EMAIL PROTECTED] wrote: Hello everyone, I'm a bit of a noob to this whole AJAX thing so you'll have to forgive me. I've setup a blog, using jQuery the comments are added to mysql using this form plugin (http://www.malsup.com/jquery/form/#getting- started). Posting the comments work great, I was even able to add in a confirmation saying Thank you for posting. My
[jQuery] Re: Compressed BlockUI plugin?
I'll try to package it up and make it available tomorrow. Aaron Ganeshji Marwaha wrote: Aaron, I would like the jar file... I want to integrate this packer along with my ant build script... -GTG On 7/14/07, *Aaron Porter* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I just ran some tests against the current version from SVN to see how fast they load on my machine. Firefox 2.0.0.4 http://2.0.0.4 on Linux: jquery.js (original uncompressed) - 158243 bytes: 66ms jquery.pack.js - 21585 bytes: 129ms jquery.compressed.js (my compressor) - 17005 bytes: 394ms IE6 on XP under VMWare on the same Linux machine: jquery.js (original uncompressed) - 158243 bytes: 15ms jquery.pack.js - 21585 bytes: 62ms jquery.compressed.js (my compressor) - 17005 bytes: 171ms On a 56K modem my version will be faster on the first load then the packed version will be faster on subsequent loads. It all depends on what you're after. I haven't made the source available yet but that's something I'm considering. I'll need to clean it up first. I could get you a jar file (it's written in Java) if you're interested. Aaron Michael Geary wrote: Sounds interesting, Aaron, thanks for the pointer. Two questions: How is the unpacking speed? I don't care how long it takes to pack the code (within reason), but unpacking speed is very important, especially on slow machines like an iPhone/Nokia/Windows Mobile phone. I saw a test report that seemed to indicate that Dean's packer took 1.5 seconds to unpack jQuery on the iPhone, which is way too slow. I would gladly take a slower packing time to get faster unpacking. Is the source code available? I can't use a compressor that I have to go to a website to use. That's fine for testing, but for production use I need to be able to integrate it into my build process and have it available at all times. Thanks, -Mike From: Aaron Porter I know Dean Edward's packer has already been suggested but you can try my compressor if you'd like: http://www.scriptingmagic.com/Topics/Compression/JavaScript%20Compressor/ My compressor is slower than packer but the results will be smaller. It also doesn't have a problem with things like missing semi-colons at the end of lines because it uses Rhino for the first pass which cleans everything up.
[jQuery] Re: Complex(ish) table formatting code not working in Firefox 2
Can anybody confirm if this is a bug? It looks like it to me! Here's the code... (function($) { $.fn.priceTable = function () { return this.each(function() { $(thead td:first, this).addClass('js-ptd'); $(thead th:last, this).addClass('js-rtd'); $(tbody th, this).addClass('js-ltd'); $(tbody tr:first td, tbody tr:first th,this).addClass('js-ttd'); $(tbody tr, this).each(function() { $(td:last, this).addClass('js-rtd'); $(td:odd, this).addClass('js-bgtd'); }); $(tbody tr:last td, tbody tr:last th,this).addClass('js-btd'); }); }; })(jQuery); $(function() { $(table.prices).priceTable(); }); On Jul 16, 1:37 pm, Will Kelly [EMAIL PROTECTED] wrote: Hi, Not sure if this is a bug or not, but Firefox seems not to properly apply a series of class names. Here's the examplehttp://www.logicbox.net/jquery/pricetable/short-css.html with a 'console.log' to fix the firefox rendering.http://www.logicbox.net/jquery/pricetable/short-css-firefox-fix.html Thinking that this might be to with specificity I did a version with more verbose CSS.http://www.logicbox.net/jquery/pricetable/verbose-css.htmlhttp://www.logicbox.net/jquery/pricetable/verbose-css-firefox-fix.html Again the same problem crops up in Firefox. They all work fine in IE6/7, Safari 3beta etc. Very odd, any ideas? This one's been annoying me for a while now! Thanks, Will
[jQuery] Re: Complex(ish) table formatting code not working in Firefox 2
I'm not sure what problem you're having. The pages appear to render identically in FF and Safari... What about it do you think isn't working right? In looking through the generated source in firebug, it appears that all of your classes are getting added to the correct elements... Actually, upon closer inspection, there is a small 1px white line between the column headers in FF that isn't in Safari, but it isn't bad, and is probably the result of a rendering difference between the browsers, not a jQuery issue. --Erik On 7/16/07, Will Kelly [EMAIL PROTECTED] wrote: Hi, Not sure if this is a bug or not, but Firefox seems not to properly apply a series of class names. Here's the example http://www.logicbox.net/jquery/pricetable/short-css.html with a 'console.log' to fix the firefox rendering. http://www.logicbox.net/jquery/pricetable/short-css-firefox-fix.html Thinking that this might be to with specificity I did a version with more verbose CSS. http://www.logicbox.net/jquery/pricetable/verbose-css.html http://www.logicbox.net/jquery/pricetable/verbose-css-firefox-fix.html Again the same problem crops up in Firefox. They all work fine in IE6/7, Safari 3beta etc. Very odd, any ideas? This one's been annoying me for a while now! Thanks, Will
[jQuery] Re: Binding problems - Thanks
Thank you Mike - I'd inadvertantly dropped the interface.js file from the head section. And thanks also for the ajaxError tip - it'll help me in the future. Cheers, Bruce At 01:47 a.m. 17/07/2007, you wrote: Bruce, You've got a scripting error on your callbacks. ScrollTo is not a defined plugin method (you've used it in multiple places). Did you mean to use scrollTop? Also, to catch errors in async callbacks bind an error handler using ajaxError: $().ajaxError(function(ev, xhr, opts, err){ alert(err); }) Cheers. Mike On 7/16/07, Bruce MacKay [EMAIL PROTECTED] wrote: Hi Mike, A sample page is here: http://horticulture227.massey.ac.nz/admin/prolearn13.asp?id=1which=2 Click on the [view student list] link (the 'class=gao' link); the [view search options] link which replaces it is unbound - despite my best attempts to re-bind. Thanks, Bruce original message. Hello folks, I'm having difficulty rebinding both a form submit and a click function upon return of an ajax call. The onload code is ... $(document).ready(function() { $(a.gao).bind(click, function() {getAllOptions()}); var options = {dataType: 'html', before: beforeAjax,after: afterAjax}; $('#getStudentInfo').submit(function() {$(this).ajaxSubmit(options);return false; }); }); function beforeAjax(html) { $(#comments3).hide();} function afterAjax(html) { $(#sDetails).html(html).fadeIn(800).ScrollTo(800).highlightFade({color:'yellow',speed:2000,iterator:'linear'}); tb_init('a.thickbox'); } When I click the class=gao link, the following call is made... function getAllOptions() { $.ajax({ type: 'GET', url: 'scripts/ajax_studentroll.asp?w=allselectrand=' + new Date().getTime(), dataType: html, success: function(html){ $('#sDetails').hide(600); $(#flipdisplay).html(html).fadeIn(800).ScrollTo(800).highlightFade({color:'yellow',speed:4000,iterator:'linear'}); $('#getStudentInfo').unbind('submit'); $(a.gao).unbind(click); var options = {dataType: 'html', before: beforeAjax,after: afterAjax}; $('#getStudentInfo').submit(function() {$(this).ajaxSubmit(options);return false; }); $(a.gao).bind(click, function() {getSearchOptions()}); } }); } The html that is correctly returned, but I cannot get the new class=gao link or the form (id=getStudentInfo) within that html block to be re-bound for subsequent action. As you can see, I've tried to unbind the functions before binding them again, but I must still doing something wrong as this wasn't successful. At 12:45 a.m. 10/07/2007, you wrote: Bruce, Do you have a sample page we can look at? I don't see anything obviously wrong with the code, but it's hard to tell without seeing more of the page. Mike I'm having difficulty rebinding both a form submit and a click function upon return of an ajax call.
[jQuery] I thought I understood threads...
Why does the following function wait until after the while loop is finished to update the #timer css? It happens in IE and Firefox - I'm (still) using jQ 1.1.2. function wait(time){ $(#timer).css(display,block); time = time * 1000; var sleeping = true; var now = new Date(); var startingMSeconds = now.getTime(); while(sleeping){ alarm = new Date(); alarmMSeconds = alarm.getTime(); if(alarmMSeconds - startingMSeconds time){ sleeping = false; } } } -- View this message in context: http://www.nabble.com/I-thought-I-understood-threads...-tf4096371s15494.html#a11647824 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: I thought I understood threads...(cut/paste example)
should have posted this before - wait.html --- !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01//EN http://www.w3.org/TR/html4/strict.dtd; html head titleUntitled/title script language=JavaScript type=text/javascript src=/js/jquery.js/script script language=JavaScript type=text/javascript !-- function wait(time){ $(#test).css(display,block); time = time * 1000; var sleeping = true; var now = new Date(); var startingMSeconds = now.getTime(); while(sleeping){ alarm = new Date(); alarmMSeconds = alarm.getTime(); if(alarmMSeconds - startingMSeconds time){ sleeping = false; } } } //-- /script style type=text/css !-- #test{ display:none } -- /style /head body div id=test WOW /div button type=button onclick=wait(4);wait/button /body /html END EXAMPLE - PragueExpat wrote: Why does the following function wait until after the while loop is finished to update the #timer css? It happens in IE and Firefox - I'm (still) using jQ 1.1.2. function wait(time){ $(#timer).css(display,block); time = time * 1000; var sleeping = true; var now = new Date(); var startingMSeconds = now.getTime(); while(sleeping){ alarm = new Date(); alarmMSeconds = alarm.getTime(); if(alarmMSeconds - startingMSeconds time){ sleeping = false; } } } -- View this message in context: http://www.nabble.com/I-thought-I-understood-threads...-tf4096371s15494.html#a11647892 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] jQuery - form plugin
Hi, I am trying to understand the difference between AjaxForm and AjaxSubmit. There are some examples Here : http://www.malsup.com/jquery/form/#sample1 With some forms. But for each form, when I click Submit, I get on a dummy.php page with some text on it. It doesn't look like an Ajax call. Has the website some problems or maybe I didn't understand the way it works ? Thank you for any help. -- View this message in context: http://www.nabble.com/jQuery---form-plugin-tf4096402s15494.html#a11647890 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Opacity problem, IE7, Tabs plugin
Hi folks, I'd greatly appreciate some help with an opacity problem (I think that's what it is) on a page where I'm using the tabs plugin: http://horticulture127.massey.ac.nz/degreecdays_test.asp When I move from one tab to another in IE7, the font quality breaks up. Any suggestions? Cheers, Bruce
[jQuery] Re: Opacity problem, IE7, Tabs plugin
Bruce MacKay wrote: Hi folks, I'd greatly appreciate some help with an opacity problem (I think that's what it is) on a page where I'm using the tabs plugin: http://horticulture127.massey.ac.nz/degreecdays_test.asp When I move from one tab to another in IE7, the font quality breaks up. Any suggestions? That is most probably the infamous ClearType issue in IE 7. If you change opacity, e.g. fade in/out an element, the ClearType rendering is once and for all removed for that element in IE 7. No fix known to me so far, this behaviour was implemented by design. If you don't use an animation though that won't occur with the latest version of Tabs. --Klaus
[jQuery] Re: Plugin Annoucements and Additions to Plugin Library
Rey, It was a great question. I know I've been in that pinch and thats why I started archiving these emails on my box as well as downloading copies. That way, if I like the plugin and the author abandons it, I still have the code to update it with. I wonder if that's worth archiving on the jQuery site somewhere. Either an FTP folder or a web folder with directory browsing turned on. Something that would just take FTP'ing the plug-in to the site. -Dan
[jQuery] Re: jQuery - form plugin
debussy007, The difference between ajaxForm and ajaxSubmit is this: ajaxForm prepares a form to be submitted using AJAX. It binds the submit event and click events and then waits for the user to submit the form. When the user clicks the submit button it invokes ajaxSubmit on your behalf. ajaxSubmit submits the form immediately. I just checked the sample pages and I'm not having any problem with them. Are you getting an alert box when you click the submit buttons? Mike Hi, I am trying to understand the difference between AjaxForm and AjaxSubmit. There are some examples Here : http://www.malsup.com/jquery/form/#sample1 With some forms. But for each form, when I click Submit, I get on a dummy.php page with some text on it. It doesn't look like an Ajax call. Has the website some problems or maybe I didn't understand the way it works ? Thank you for any help. -- View this message in context: http://www.nabble.com/jQuery---form-plugin-tf4096402s15494.html#a11647890 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: Plugin Annoucements and Additions to Plugin Library
Some potential problems with the new plugin repo include: a) Spambots are gonna figure out how to invade it at some point (probably). Yeah, that's definitely a potential issue--especially with the popularity of jQuery. b) There are nearly no controls in place to keep a malicious user from spamming his plugin all over the place, e.g. by adding it to every category or uploading it via multiple names. c) The alphabetic display of plugins rewards those authors who name their plugins starting with the letter 'A', because those are the first ones which users will see when browsing the list. While overall B C are possible, I'm not it'll be a problem with the jQuery community. Issue B might crop up from time to time, but moderating will take care of that. As for Issue C, I think most developers are going to read through the list of all the plug-ins to make sure they grab the one that best fits their needs. There are lots of similar plug-ins (especially when dealing with tooltips and lightbox implementations.) Even if a developer does name their plug-in with A, it's still got to do the job correctly or people will abandon it. I guess as long as the jQuery plug-in repository is a list of open source, non-commercial plug-ins, I can't see B or C being much of an issue. -Dan
[jQuery] Re: I thought I understood threads...Works in Opera
Sorry to be replying to my own threads, but this just gets more interesting. Apparently, in IE and Firefox, the function must run to completion before the UI is updated with any CSS / DOM changes, but in Opera, the UI is updated immediately upon the jQ call. I was trying to get a 'waiting' gif to appear at the beginning of a long function call, but found that it was never appearing. I guess I need to display the gif in a function before the long function. PragueExpat wrote: Why does the following function wait until after the while loop is finished to update the #timer css? It happens in IE and Firefox - I'm (still) using jQ 1.1.2. function wait(time){ $(#timer).css(display,block); time = time * 1000; var sleeping = true; var now = new Date(); var startingMSeconds = now.getTime(); while(sleeping){ alarm = new Date(); alarmMSeconds = alarm.getTime(); if(alarmMSeconds - startingMSeconds time){ sleeping = false; } } } -- View this message in context: http://www.nabble.com/I-thought-I-understood-threads...-tf4096371s15494.html#a11648563 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: I thought I understood threads...
OK, OK, I know - I'm having a nice conversation with myself here. Just found this : http://dev.opera.com/articles/view/timing-and-synchronization-in-javascript/ Timing of Rendering Programmatic changes to the DOM or style sheet might not render immediately. It depends on the browser. For example, if the background color of an element is changed through the DOM, the DOM will immediately reflect the change (and the DOM mutation event will be dispatched immediately and synchronously), but we do not know for certain when the browser engine will come around to actually rendering the changes visually on the screen. While it seems that in Mozilla and Internet Explorer the changes are postponed until the current event dispatch has completed, these changes seem to be rendered immediately in Opera. - PragueExpat wrote: Why does the following function wait until after the while loop is finished to update the #timer css? It happens in IE and Firefox - I'm (still) using jQ 1.1.2. function wait(time){ $(#timer).css(display,block); time = time * 1000; var sleeping = true; var now = new Date(); var startingMSeconds = now.getTime(); while(sleeping){ alarm = new Date(); alarmMSeconds = alarm.getTime(); if(alarmMSeconds - startingMSeconds time){ sleeping = false; } } } -- View this message in context: http://www.nabble.com/I-thought-I-understood-threads...-tf4096371s15494.html#a11648610 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: jQuery - form plugin
Thank you, if I understood correctly AjaxForm bind callback function with the submit button, and I can do some validations in this function. No, I don't see any alert, nothing, I am just forwarded to the dummy.php page, But now that I write these lines, I think it is probably the secured connection in my company that breaks the script ! Thank you for your support. debussy007 wrote: Hi, I am trying to understand the difference between AjaxForm and AjaxSubmit. There are some examples Here : http://www.malsup.com/jquery/form/#sample1 With some forms. But for each form, when I click Submit, I get on a dummy.php page with some text on it. It doesn't look like an Ajax call. Has the website some problems or maybe I didn't understand the way it works ? Thank you for any help. -- View this message in context: http://www.nabble.com/jQuery---form-plugin-tf4096402s15494.html#a11648778 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: IE takes link when firing onclick event
QuEz, If you take away all your .css, does it work? Also, I am assuming it was a copy/paste error, but you are missing an ending ) Also, you should be able to combine your css tags: .css( color:'red', fontStyle:'italic', fontWeight:'bold' ) Let me know if this helps any. On 7/17/07, quez [EMAIL PROTECTED] wrote: Hi guys, New to jquery but really loving it so far. I've done some code that seemed to work in all tested browsers, except IE The code: $(a.more).click( function(){ $(a.more ).css(color,red).css(font-style,italic).css(font- weight,bold); $(dl.hidden).show(slow); return false; } I am returning false, so the default behavior should've be nullified, but IE still insists on taking the link to a non-existing page (and displays an error). any help with this matter is dearly appreciated. I will update if I find the solution. Thanks all. *QuEz* -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: Complex(ish) table formatting code not working in Firefox 2
I second Erik on this, can you elaborate on your issue? Maybe send a screen shot of what you are getting? On 7/17/07, Erik Beeson [EMAIL PROTECTED] wrote: I'm not sure what problem you're having. The pages appear to render identically in FF and Safari... What about it do you think isn't working right? In looking through the generated source in firebug, it appears that all of your classes are getting added to the correct elements... Actually, upon closer inspection, there is a small 1px white line between the column headers in FF that isn't in Safari, but it isn't bad, and is probably the result of a rendering difference between the browsers, not a jQuery issue. --Erik On 7/16/07, Will Kelly [EMAIL PROTECTED] wrote: Hi, Not sure if this is a bug or not, but Firefox seems not to properly apply a series of class names. Here's the example http://www.logicbox.net/jquery/pricetable/short-css.html with a 'console.log' to fix the firefox rendering. http://www.logicbox.net/jquery/pricetable/short-css-firefox-fix.html Thinking that this might be to with specificity I did a version with more verbose CSS. http://www.logicbox.net/jquery/pricetable/verbose-css.html http://www.logicbox.net/jquery/pricetable/verbose-css-firefox-fix.html Again the same problem crops up in Firefox. They all work fine in IE6/7, Safari 3beta etc. Very odd, any ideas? This one's been annoying me for a while now! Thanks, Will -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com
[jQuery] Re: Complex(ish) table formatting code not working in Firefox 2
Erik thanks, Just had a friend test on Firefox 2 on Mac OS X, and he had no problem, are you on the same platform? I think possibly it's a Windows issue only. Created new example pages to better demonstrate. This page: http://www.logicbox.net/jquery/pricetable/index1.html The top table is unmodified and the bottom one should be in should be fully jqueried up. However in Firefox 2 (2.0.0.4 here, not sure about 1 or 1.5etc) the border styles around the td's/th's in the table body aren't rendered (though the class names are correctly applied). On this page (with Firebug installed): http://www.logicbox.net/jquery/pricetable/index2.html It renders it correctly with a console.log($(table.prices1)) 'hack'. Will On Jul 17, 12:37 pm, Erik Beeson [EMAIL PROTECTED] wrote: I'm not sure what problem you're having. The pages appear to render identically in FF and Safari... What about it do you think isn't working right? In looking through the generated source in firebug, it appears that all of your classes are getting added to the correct elements... Actually, upon closer inspection, there is a small 1px white line between the column headers in FF that isn't in Safari, but it isn't bad, and is probably the result of a rendering difference between the browsers, not a jQuery issue. --Erik On 7/16/07, Will Kelly [EMAIL PROTECTED] wrote: Hi, Not sure if this is a bug or not, but Firefox seems not to properly apply a series of class names. Here's the example http://www.logicbox.net/jquery/pricetable/short-css.html with a 'console.log' to fix the firefox rendering. http://www.logicbox.net/jquery/pricetable/short-css-firefox-fix.html Thinking that this might be to with specificity I did a version with more verbose CSS. http://www.logicbox.net/jquery/pricetable/verbose-css.html http://www.logicbox.net/jquery/pricetable/verbose-css-firefox-fix.html Again the same problem crops up in Firefox. They all work fine in IE6/7, Safari 3beta etc. Very odd, any ideas? This one's been annoying me for a while now! Thanks, Will
[jQuery] selectbox: change selected item
Hi, I don't know how to change the selected item in a selectbox. I tried this but it doesn't work as expected. HTML code: = select id=id_cliente name=cliente size=1 option value= selected=selected-/option option value=1First/option option value=2Second/option /select javascript code: var cliente = 2; $('#id_cliente:nth-child(cliente)').attr('selected','selected'); any ideas? Thank you!
[jQuery] ANNOUNCE: tablesorter 2.0 beta released!
After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.xrelease. The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Best regards Christian
[jQuery] Re: selectbox: change selected item
zenx wrote: Hi, I don't know how to change the selected item in a selectbox. I tried this but it doesn't work as expected. HTML code: = select id=id_cliente name=cliente size=1 option value= selected=selected-/option option value=1First/option option value=2Second/option /select javascript code: var cliente = 2; $('#id_cliente:nth-child(cliente)').attr('selected','selected'); any ideas? Thank you! Try: var cliente = 2; $('#id_cliente').val(cliente); --Klaus
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Christian Bach schreef: After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.x release. The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Best regards Christian Just a tiny error on the page. I think the filesize in the links need to be switched. Sorry for the nitpicking :) -- David Duymelinck [EMAIL PROTECTED]
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
2007/7/17, David Duymelinck [EMAIL PROTECTED]: Christian Bach schreef: After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.x release. The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Best regards Christian Just a tiny error on the page. I think the filesize in the links need to be switched. Sorry for the nitpicking :) Thanks David, there switched now :)
[jQuery] Re: Complex(ish) table formatting code not working in Firefox 2 [windows bug?]
Ouch rather annoyingly googlegroups ate my reply!.. Erik thanks, I got a friend to test on FF2 on Mac OS X and he had no problems, are you on the same platform? I think possibly it's a FF Windows issue. To clarify this problem ive done a couple of new examples. http://www.logicbox.net/jquery/pricetable/index1.html Top table is unmodified, bottom one has is jqueried, however in FF2 Win (2.0.0.4 here, not tested on 1/1.5) it does not correctly render the border on the td's/th's within the tbody (though the classnames are correctly applied). http://www.logicbox.net/jquery/pricetable/index2.html This works on FF2 (with Firebug). I've applied the 'fix' console.log($ (table.prices1)) Will On Jul 17, 12:37 pm, Erik Beeson [EMAIL PROTECTED] wrote: I'm not sure what problem you're having. The pages appear to render identically in FF and Safari... What about it do you think isn't working right? In looking through the generated source in firebug, it appears that all of your classes are getting added to the correct elements... Actually, upon closer inspection, there is a small 1px white line between the column headers in FF that isn't in Safari, but it isn't bad, and is probably the result of a rendering difference between the browsers, not a jQuery issue. --Erik On 7/16/07, Will Kelly [EMAIL PROTECTED] wrote: Hi, Not sure if this is a bug or not, but Firefox seems not to properly apply a series of class names. Here's the example http://www.logicbox.net/jquery/pricetable/short-css.html with a 'console.log' to fix the firefox rendering. http://www.logicbox.net/jquery/pricetable/short-css-firefox-fix.html Thinking that this might be to with specificity I did a version with more verbose CSS. http://www.logicbox.net/jquery/pricetable/verbose-css.html http://www.logicbox.net/jquery/pricetable/verbose-css-firefox-fix.html Again the same problem crops up in Firefox. They all work fine in IE6/7, Safari 3beta etc. Very odd, any ideas? This one's been annoying me for a while now! Thanks, Will
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Interesting that the packed version is twice as large as the unpacked. :-) -- When dealing with people, remember you are not dealing with creatures of logic, but creatures of emotion. -- Dale Carnegie Rick Pasotto[EMAIL PROTECTED]http://www.niof.net
[jQuery] Re: Complex(ish) table formatting code not working in Firefox 2
Screenshot from FF2 here http://www.logicbox.net/jquery/pricetable/screen.jpg On Jul 17, 2:15 pm, Benjamin Sterling [EMAIL PROTECTED] wrote: I second Erik on this, can you elaborate on your issue? Maybe send a screen shot of what you are getting?
[jQuery] Issue w/cloneNode(true) and form elements in IE 6/7...
While working on a jQuery Interface project, I came across an issue with some code using the Draggable library. It turns out in IE6 the cloneNode(true) does not properly copy the current state of all HTML elements. Checkbox, radio and select box elements all lose their current settings. I blogged some more info here: http://blog.pengoworks.com/blogger/index.cfm?action=blog:599 And here's an example: http://www.pengoworks.com/workshop/bugs/cloneNode_issue.htm (The example code uses straight DOM manipulation to simplify the examples and to show it's not jQuery specific.) Anyway, I believe this issue is the root cause of some other issues that have been reported about jQuery such as Ticket #769 (Checkbox's state is erased after wrap() action (IE 6)): http://dev.jquery.com/ticket/769 I provide a solution to fix the problem in my blog (and in the example code.) Perhaps this fix should be implemented in the clone() method and other places where cloneNode(true) is used. -Dan
[jQuery] Re: selectbox: change selected item
I don't know how to change the selected item in a selectbox. I tried this but it doesn't work as expected. HTML code: = select id=id_cliente name=cliente size=1 option value= selected=selected-/option option value=1First/option option value=2Second/option /select javascript code: var cliente = 2; $('#id_cliente:nth-child(cliente)').attr('selected','selected'); any ideas? Using my Field plug-in (http://jquery.com/plugins/project/field) you could do: $(#id_cliente).setValue(2); The big benefit to using my Field plug-in is that you can change the form field from a select box to a checkbox or radio element and you would not have to refactor code that grabs/sets the value of the field. -Dan
[jQuery] Re: I thought I understood threads...Works in Opera
On Jul 17, 2:42 pm, PragueExpat [EMAIL PROTECTED] wrote: Apparently, in IE and Firefox, the function must run to completion before the UI is updated with any CSS / DOM changes, but in Opera, the UI is updated immediately upon the jQ call. Yeah, someone mentioned that behaviour a couple of days ago here in the forum. The IE/FF behaviour is saner, IMO, because making 100% sure that all JS/HTML elements are properly locked is, philosophically speaking, impossible, once one considers that arbitrary browser plugins and timer-triggered JS code can manipulate the DOM at literally any microsecond. I was trying to get a 'waiting' gif to appear at the beginning of a long function call, but found that it was never appearing. I guess I need to display the gif in a function before the long function. You could try using the blockUI jQuery plugin - it is designed for just that type of thing. It blocks the user interface so the user cannot click on anything while your operation is running.
[jQuery] Re: Plugin Annoucements and Additions to Plugin Library
Thats a great idea Dan. I'll be glad to upload what I have. Let me talk to John and see what he thinks. Rey Dan G. Switzer, II wrote: Rey, It was a great question. I know I've been in that pinch and thats why I started archiving these emails on my box as well as downloading copies. That way, if I like the plugin and the author abandons it, I still have the code to update it with. I wonder if that's worth archiving on the jQuery site somewhere. Either an FTP folder or a web folder with directory browsing turned on. Something that would just take FTP'ing the plug-in to the site. -Dan -- BrightLight Development, LLC. 954-775- (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Christian, After another late night, fixing a few bugs, the code is finally ready for it's first beta release. Looks really good. This seems much more responsive than the previous version. The main new features include: * Multi-column sorting I'm glad to see you made the multi-column sort key configurable. My instinct was to use the [CTRL] key, not the [SHIFT] key (although I know Outlook uses the [SHIFT] key.) -Dan
[jQuery] Re: Plugin Annoucements and Additions to Plugin Library
On Jul 17, 2:40 pm, Dan G. Switzer, II [EMAIL PROTECTED] wrote: c) The alphabetic display of plugins rewards those authors who name their plugins starting with the letter 'A', because those are the first ones which users will see when browsing the list. ... As for Issue C, I think most developers are going to read through the list of all the plug-ins to make sure they grab the one that best fits their needs. Two words: google rating As far as search engines go, reportedly most people don't look past the first 3 entries if they find something suitable, and the vast majority of people never look past the first page of results. Of course, there's not much, in terms of policy, that jQ can do to stop people from naming their plugins AAA MyPlugin. As you said, moderation will probably have to play a role (should it become a problem, and as Seth Gecko says in Dusk 'til Dawn, it's not a problem until you make it a problem). :)
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
2007/7/17, Rick Pasotto [EMAIL PROTECTED]: On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Interesting that the packed version is twice as large as the unpacked. :-) Yeah, packer doesn't always work as expected :)
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
I'm glad to see you made the multi-column sort key configurable. My instinct was to use the [CTRL] key, not the [SHIFT] key (although I know Outlook uses the [SHIFT] key.) Tablesorter can be configured to use either SHIFT or CTRL, all though SHIFT is default. Here is a example on how to change it to the control key: $(table).tablesorter({ sorting: { // valid values: ctrlKey, altKey, shiftKey multisortKey: 'ctrlKey', } }); /christian
[jQuery] Re: Issue w/cloneNode(true) and form elements in IE 6/7...
Would you mind reposting this over on the Dev list? It would be nice to get that bug knocked out for good already. -- Brandon Aaron On 7/17/07, Dan G. Switzer, II [EMAIL PROTECTED] wrote: While working on a jQuery Interface project, I came across an issue with some code using the Draggable library. It turns out in IE6 the cloneNode(true) does not properly copy the current state of all HTML elements. Checkbox, radio and select box elements all lose their current settings. I blogged some more info here: http://blog.pengoworks.com/blogger/index.cfm?action=blog:599 And here's an example: http://www.pengoworks.com/workshop/bugs/cloneNode_issue.htm (The example code uses straight DOM manipulation to simplify the examples and to show it's not jQuery specific.) Anyway, I believe this issue is the root cause of some other issues that have been reported about jQuery such as Ticket #769 (Checkbox's state is erased after wrap() action (IE 6)): http://dev.jquery.com/ticket/769 I provide a solution to fix the problem in my blog (and in the example code.) Perhaps this fix should be implemented in the clone() method and other places where cloneNode(true) is used. -Dan
[jQuery] [OT] Importing jQuery mailing list archives
Hi, This is not directly related to jQuery, but to this mailing list. Sorry for the off-topic. I'd like to know how did you moved the entire mailing list archives to Google Groups. Were the messages re-sent or...? I'm asking because people from another project I'm involved is considering to migrate to Google Groups and I couldn't find an official way to import archives from Mailman. There are topics about this in Google Groups discussion group, but no solution is given. And I knew that jQuery-en moved including its archives, so... could you give me a clue? thanks, rodrigo moraes
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
excellent job christian, i have one bug to report: consider this html if the tr element contains inline styles such as: tr style=background-color:red once sorted, the style is removed. not a biggie, but can be annoying. cheers! Alexandre _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Christian Bach Sent: mardi 17 juillet 2007 14:05 To: jquery-en@googlegroups.com Subject: [jQuery] ANNOUNCE: tablesorter 2.0 beta released! After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.x release. The new 2.0 release can be found here: HYPERLINK http://lovepeacenukes.com/tablesorter/2.0/http://lovepeacenukes.com/tables orter/2.0/ Best regards Christian Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.8/904 - Date: 16/07/2007 17:42
[jQuery] Re: Plugin Annoucements and Additions to Plugin Library
Two words: google rating As far as search engines go, reportedly most people don't look past the first 3 entries if they find something suitable, and the vast majority of people never look past the first page of results. Maybe I'm giving jQuery Developers too much credit, but I would think the majority of developers are going to look for the best match for their project--not just the first match. Regardless, if the plug-in is crappy, people will go back. A possible solution to this would be to factor sorting by a custom weight which is based upon age and rating. Provide the most popular plug-ins at top by default. However, I wouldn't implement this solution until there are more ratings in the database. Plus, I know there's a bug (http://jquery.com/plugins/node/185) where rating a plug-in doesn't always register. I know votes for my plug-in don't seem to register: http://jquery.com/plugins/project/field
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
excellent job christian, Thanks! i have one bug to report: consider this html if the tr element contains inline styles such as: tr style=background-color:red once sorted, the style is removed. I did a quick test, and the style attribute was not removed, perhaps the style is over-written by a css class? Tablesorter by default adds a class by the name .header to all th elements. /christian
[jQuery] IE Problems
I have a bit of code that works just fine in Firefox but does nothing Internet Explorer. Right now, I am using the JQuery tabs plugin, remotely calling a page that displays various links. These links are the links that I am using in my code. They use another page and return the results in a DIV. Here is the code I am using. $(document).ready(function() { // add markup to container and applier click handlers to anchors $(#racks a).click(function(e){ // send request $.post(buildRack.php, {rack_name: $(this).html(), rack_id: $(this).attr(id)}, function(pre) { // format and output result $(#ird).html(pre); }); // stop normal link click return false; }); }); I hope I explained this well enough, I am new to JQuery, sorry for the noobie. :) Thanks! -- View this message in context: http://www.nabble.com/IE-Problems-tf4097251s15494.html#a11650549 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: search text, find urls and list
Hi Karl- Thanks. I really appreciate it. I've got (I think) syntax errors. The firefox console is telling me missing } after function body \n - it seems to be the last line of the code and no matter what combination of characters I use there. Here's what I've got: script src=http://www.helderberg-bmdc.org/scripts/jquery.js; type=text/javascript/script script type=text/javascript /* ![CDATA[ */ $(document).ready(function() { var $extLinks; $(#content a).not([EMAIL PROTECTED]'helderberg-bmdc.org/']).each(function(index) { if (index == 0) { $extLinks = $('ol id=extLinks/ol'); } var thisHref = this.href; $('li/li').text(thisHref).appendTo($extLinks); $extLinks.appendTo(#content); )}; /* ]] */ /script I'm serving the files up as xhtml 1.1 with mime-type application/xhtml+xml for the browsers that understand it and text/html (html 4.01) for the browsers that don't. The page validates and there's no css errors. Thanks in advance for anyone's hints, tips or fixes. Take care. Hugh - Original Message - From: Karl Swedberg To: jquery-en@googlegroups.com Sent: Monday, July 16, 2007 4:05 PM Subject: [jQuery] Re: search text, find urls and list Hi Hugh, You might want to use the .each() method for this so you can iterate through the links and create new elements as you go. Something like this should work: var $extLinks; $(#content a).not([EMAIL PROTECTED]'mysite.com/']).each(function(index) { if (index == 0) { $extLinks = $('ol id=extLinks/ol'); } var thisHref = this.href; $('li/li').text(thisHref).appendTo($extLinks); }); $extLinks.appendTo(#content); --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 16, 2007, at 3:39 PM, Hugh Hayes wrote: Hi All- This is a newbie designer question. I think jquery's great and I'm trying to find more uses for it. I've got this- $(#content a).not([EMAIL PROTECTED]'mysite.com/']).clone().appendTo(#content); I was trying to get a line break in between each link but couldn't and I was hoping somebody here could give me a hand. I'm trying to learn so I'm trying to do this step-by-step. I've been reading the doc's and see that $(a) going to pick up the anchors. I saw .getUrlParam and tried .getUrlParam(href) but was only able to get strHref has no properties. It's probably obvious but what I'm trying to do is go through the content div, collect all the external http:... addresses and put them into a ul or ol at the bottom of the page. I just want to make it easy for people to copy them. Thanks and thanks for jquery. When you're doing sites by yourself it's hard to add the kind of enhancements that jquery offers. Thanks again, Hugh
[jQuery] Re: Problem with jQuery.fix in event model
Thank you very much, that solved the problem. As a note, I tweaked the solution slightly and it is a bit simpler and works just fine: // Calculate pageX/Y if missing and clientX/Y available if ( event.pageX == null event.clientX != null ) { var e = document.documentElement, b = document.body; event.pageX = event.clientX + (e e.scrollLeft || b b.scrollLeft || 0); event.pageY = event.clientY + (e e.scrollTop || b b.scrollTop || 0); } JK - Original Message - From: John Resig [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Monday, July 16, 2007 4:47 PM Subject: [jQuery] Re: Problem with jQuery.fix in event model This one seems to have a working patch: http://dev.jquery.com/ticket/1402 --John On 7/16/07, Jeffrey Kretz [EMAIL PROTECTED] wrote: Thanks very much, this is great to know. In case 1.1.4 is delayed, is there a workaround or a patch I can use on a temporary basis? JK - Original Message - From: John Resig [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Monday, July 16, 2007 2:45 PM Subject: [jQuery] Re: Problem with jQuery.fix in event model This is a bug in jQuery that will be fixed in 1.1.4 (which should be coming out soon). There's a ticket open on it now, and we're working to resolve it. --John On 7/16/07, Jeffrey Kretz [EMAIL PROTECTED] wrote: I am trying an integration of Ext and jQuery for a new project. In doing a simple demo page, I've run into a problem whereby the jQuery.fix method for events is firing on a mousemove before the DOM is loaded. Sample page at: http://dev.scorpiondesign.com/Clients/Test.htm Tested in IE7 (not sure if the problem exists in other browsers). To reproduce error: Once the page is loaded, refresh the page ensuring the mouse doesn't move at all. Page loads fine, button script executes. Next, start a page refresh and move the mouse while the page is being loaded. An error occurs on line 1445 jquery.js, where document.body is null, as the mousemove event is firing before DOM is loaded. Is this is a flaw in Ext or jQuery? What would be the best approach to handle it? JK
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.xrelease. The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Looks promising but I'm having a little problem with numeric sorting. Here's my invocation and the table header. $(function() { $(#listclubs).tablesorter(); }); theadtr th class={sorter:'integer'}ID#/th thClub Name/th thArea/th thType/th thCharter/th /tr/thead When the page first appears it is sorted the way I wrote it but if I click on the first column it does an alpha sort ('1055512' comes before '1312' and '1420'). Also, is it possible to apply a style to the table based on which column is sorted? And one more thing. I'm using cluetip.js on that first column and it no longer works. -- Those words, 'temperate' 'moderate', are words either of political cowardice, or of cunning, or seduction... A thing moderately good is not so good as it ought to be. Moderation in temper is always a virtue, but moderation in principle is a species of vice. -- Thomas Paine Letter to Addressors Rick Pasotto[EMAIL PROTECTED]http://www.niof.net
[jQuery] ANNOUNCE: Horizontal Accordion 0.51
Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de
[jQuery] Re: selectbox: change selected item
Dan G. Switzer, II wrote: I don't know how to change the selected item in a selectbox. I tried this but it doesn't work as expected. HTML code: = select id=id_cliente name=cliente size=1 option value= selected=selected-/option option value=1First/option option value=2Second/option /select javascript code: var cliente = 2; $('#id_cliente:nth-child(cliente)').attr('selected','selected'); any ideas? Using my Field plug-in (http://jquery.com/plugins/project/field) you could do: $(#id_cliente).setValue(2); The big benefit to using my Field plug-in is that you can change the form field from a select box to a checkbox or radio element and you would not have to refactor code that grabs/sets the value of the field. -Dan Dan, that truly is an advantage. But I was of the opinion, that val() works with selects and radios as well, thus the refactoring possibility exists for core jQuery as well (of course I don't want people to stay away from your plugin by saying that). Another question (Mike, Dan?). What are the differences between form and field plugin? --Klaus
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Did the video help, Alexander? Also, upon initial load, it appears as if the container div shifts to the left and the reshifts to the right. Overall, it works much better on this go round. Awesome work. Rey Alexander Graef wrote: Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de -- BrightLight Development, LLC. 954-775- (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Thats much nicer! I tried to play about with your plugin this morning, wasn't working very well in my layout - but I'll give it a try once it's been made a bit more generic. Thanks On 7/17/07, Alexander Graef [EMAIL PROTECTED] wrote: Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de -- Tane Piper http://digitalspaghetti.tooum.net This email is: [ ] blogable [ x ] ask first [ ] private
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Was never able to load your video, just gave me a black screen. The image in the background was related to css loading from my CMS, which I cleaned up. Also the shifting to the right is related to that. Glad you like the changes. Alexander -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Tuesday, July 17, 2007 5:15 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51 Did the video help, Alexander? Also, upon initial load, it appears as if the container div shifts to the left and the reshifts to the right. Overall, it works much better on this go round. Awesome work. Rey Alexander Graef wrote: Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de -- BrightLight Development, LLC. 954-775- (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com __ NOD32 2402 (20070717) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Another odd behavior that seems isolated to IE. If I hover over any of the panels prior to the page fully loading, you'll see them kind of animate and move around. To replicate, just do a hard refresh and as soon as you see the panels, staty hovering over them. Rey Alexander Graef wrote: Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de -- BrightLight Development, LLC. 954-775- (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com
[jQuery] Re: Autocomplete - form elements in IE
Apparently, I didn't have the latest version of bgiframe. BTW, the documentation still lists the dimensions plugin as a required plugin. This was changed, correct? On Jul 16, 3:20 pm, Shelane Enos [EMAIL PROTECTED] wrote: For the lastest version of the autocomplete plugin (http://dev.jquery.com/browser/trunk/plugins/autocomplete/), I added the z-index: 9 to the .ac_results class, but I'm still seeing other HTML elements float up above it in IE. Any help in this topic? I have included the plugin dependencies (below, bgiframe). What else may I be missing?
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Ah yes...the text box is much better looking this time. Plus you resolved that display issue with using show/hide. Only one additional comment..I'd like to see the thing feel more responsive. Currently you're completely closing one blade before opening another. Any chance of closing one and opening another at the same time? That's usually the default behavior for accordions. One more thing...this is more of a design issue, than a code issue, but I'd like to see the far left blade be fixed in position. It can have content, but it would never move. Possibly related to this is that when the blade opens, the text pushes right up against the left side of the following blade (which is good IMO), but when it closes, there's a small window of white (about 2 inches wide) which appears and covers the text as it slides to the left. I think it would look better if that white box weren't there. Well done my friend! This is something that I think a lot of people will get use from. You should be proud. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alexander Graef Sent: Tuesday, July 17, 2007 10:08 AM To: jquery-en@googlegroups.com Subject: [jQuery] ANNOUNCE: Horizontal Accordion 0.51 Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de
[jQuery] Re: Frequently Asked Questions (FAQ)
Two questions I had when starting with jQuery, and glancing through the API docs, I still don't see them documented (maybe in a tutorial?): (1) How do you select an element by its ID? (2) How do you select all elements given a CSS class? This leads to an interesting documentation question: How do we explain JQuery to people who don't know CSS? Part of the initial appeal of JQuery for me was exactly the use of CSS for selecting the DOM elements, with the promise that if that ever is not enough, I have much of XPath available. But a certain basic concept is just assumed at almost all levels of JQuery documentation, namely that, for example, div#myId .myClass represents all elements inside the div whose id is myId which have class myClass. The link near the beginning of the Selectors page to the Wikipedia CSS article is fine, but is easy to overlook for the user who doesn't really know what they need CSS for in the first place. I don't have any particular suggestions, but it might be worth considering the most basic of CSS primers on the Selectors page. -- Scott
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Looks promising but I'm having a little problem with numeric sorting. Here's my invocation and the table header. $(function() { $(#listclubs).tablesorter(); }); theadtr th class={sorter:'integer'}ID#/th thClub Name/th thArea/th thType/th thCharter/th /tr/thead When the page first appears it is sorted the way I wrote it but if I click on the first column it does an alpha sort ('1055512' comes before '1312' and '1420'). Yeah, you need John's metadata plugin to allow in-line configuration, i totally forgot to mention that. You can grab it from here: http://jquery.com/dev/svn/trunk/plugins/metadata/lib/jQuery/metadata.js?format=txt Also, is it possible to apply a style to the table based on which column is sorted? Not at the moment i will see if i have the time to whip up a widget that could support that. And one more thing. I'm using cluetip.js on that first column and it no longer works. It should work, I'm not familiar with the cluetip plugin, but I'm not removing any thing from the table.
[jQuery] Re: Frequently Asked Questions (FAQ)
Richard D. Worth wrote: New wiki page: http://docs.jquery.com/Frequently_Asked_Questions This is great! I think there should be a link to this from the Getting Started list on the documentation page. I don't have authorization to edit the Main Page or whatever template is used, or I would do it myself. -- Scott
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
On Tue, Jul 17, 2007 at 11:01:55AM -0400, Rick Pasotto wrote: On Tue, Jul 17, 2007 at 03:04:59PM +0200, Christian Bach wrote: After another late night, fixing a few bugs, the code is finally ready for it's first beta release. The main new features include: * Multi-column sorting * In-line support for setting options done via the class attribute on the TH elements. * The plugin has been re-written from scratch. * Support for rowspan and colspan on TH elements. * New widget support, more information in the docs. Hopefully this will take care of all the issues that was related to the 1.xrelease. The new 2.0 release can be found here: http://lovepeacenukes.com/tablesorter/2.0/ Looks promising but I'm having a little problem with numeric sorting. Here's my invocation and the table header. $(function() { $(#listclubs).tablesorter(); }); theadtr th class={sorter:'integer'}ID#/th thClub Name/th thArea/th thType/th thCharter/th /tr/thead When the page first appears it is sorted the way I wrote it but if I click on the first column it does an alpha sort ('1055512' comes before '1312' and '1420'). Also, is it possible to apply a style to the table based on which column is sorted? And one more thing. I'm using cluetip.js on that first column and it no longer works. Immediately after sending the above I think I realized what the problem is. Each of the numeric values in that first column is wrapped in a/a and you're probably sorting on that. Do I need to write a parser? If so, what might it be? -- There are 2 fools in every market: one asks too little, one asks too much. -- Russian proverb Rick Pasotto[EMAIL PROTECTED]http://www.niof.net
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Well this is most likely related to the background image loading. Should not happen if you assign a solid colour for the background instead. Alexander -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Tuesday, July 17, 2007 5:17 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51 Another odd behavior that seems isolated to IE. If I hover over any of the panels prior to the page fully loading, you'll see them kind of animate and move around. To replicate, just do a hard refresh and as soon as you see the panels, staty hovering over them. Rey Alexander Graef wrote: Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de -- BrightLight Development, LLC. 954-775- (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com __ NOD32 2402 (20070717) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
[jQuery] Re: blockUI plugins consume too much CPU
Hi Mike, I am using Windows2000/XP, and browser is IE6/IE7/Firefox2. The url you can try is http://peds2.caitco.com, this is a chinese version, hope . Please just try it at random:) When we using a powerful CPU, it is not a problem. For example my PC's CPU is AMD2600+. And it only consume about 30% CPU by using IE, 20% by using FF. And BlockUI is fast enough. But when my test engineers test the system with an old machine, which CPU less than 1Gz, blockUI will make the CPU 100% and need 2-5 seconds to wait even which real operation might only take less than 1 second. I mean there still have a lot of old machine there, and we still need consider them. What do you say? Thanks, Jiming
[jQuery] Re: selectbox: change selected item
Using my Field plug-in (http://jquery.com/plugins/project/field) you could do: $(#id_cliente).setValue(2); The big benefit to using my Field plug-in is that you can change the form field from a select box to a checkbox or radio element and you would not have to refactor code that grabs/sets the value of the field. -Dan Dan, that truly is an advantage. But I was of the opinion, that val() works with selects and radios as well, thus the refactoring possibility exists for core jQuery as well (of course I don't want people to stay away from your plugin by saying that). I don't believe val() is 100% cross-browser compatible for select elements. val: function( val ) { return val == undefined ? ( this.length ? this[0].value : null ) : this.attr( value, val ); }, The code only works if the element returns a value attribute. This might work in most modern browsers for a select-one element, I'm not sure what the behavior is for a select-multi element. Also, my getValue()/setValue() methods work with checkbox and radio elements (well, every field element--the only exception being the setValue() on read-only elements.) Another question (Mike, Dan?). What are the differences between form and field plugin? The Field plug-in is basically a companion/stand-alone to the Form plug-in. You don't need Mike's Form plug-in, but it works great in conjunction with Mike's code. My plug-in is geared towards reading and manipulating the form fields themselves. Methods such as the formHash() make it really easy to populate a form based upon a JSON packet. It's also the first jQuery plug-in that allowed both getting and setting the value for all form field elements. I'm also working on adding addition useful form-based UI methods. I just recently added limitSelection() (allows you to limit the number of checkbox/select elements that can be selected) and createCheckboxRange() (allows you to [SHIFT]+click to highlight a range of checkbox elements.) -Dan
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Glad you enjoy it. Well most of the behaviour right now is intentional, as that is how I designed it. This will change once I moved it to a plugin. So now that I have the proof of concept working, I can dive into making it as easy as possible for everyone else to use :-) Will also deal with different closing / opening patterns for the accordion. Concerning the white, this is related to the click handler and its background image, but something I am working on :-) Thanks for the feedback Cheers Alexander _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: Tuesday, July 17, 2007 5:34 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51 Ah yes...the text box is much better looking this time. Plus you resolved that display issue with using show/hide. Only one additional comment..I'd like to see the thing feel more responsive. Currently you're completely closing one blade before opening another. Any chance of closing one and opening another at the same time? That's usually the default behavior for accordions. One more thing...this is more of a design issue, than a code issue, but I'd like to see the far left blade be fixed in position. It can have content, but it would never move. Possibly related to this is that when the blade opens, the text pushes right up against the left side of the following blade (which is good IMO), but when it closes, there's a small window of white (about 2 inches wide) which appears and covers the text as it slides to the left. I think it would look better if that white box weren't there. Well done my friend! This is something that I think a lot of people will get use from. You should be proud. _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alexander Graef Sent: Tuesday, July 17, 2007 10:08 AM To: jquery-en@googlegroups.com Subject: [jQuery] ANNOUNCE: Horizontal Accordion 0.51 Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de __ NOD32 2402 (20070717) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
[jQuery] Re: blockUI plugins consume too much CPU
Hmm, my corporate firewall won't let me access that site. Something you can try is to override the opacity by setting the overlayCSS.opacity value to 0 or 1. For example: $.blockUI.defaults.overlayCSS.opacity = 0; - or - $.blockUI.defaults.overlayCSS.opacity = 1; This will tell you if it is the opacity calcs and rendering that are causing the spike. If so, and you're concerned about those older less powerful machines then you'll need to decide if you can live with a fully opaque or fully transparent solution. Or if you need to find a different solution altogether. Let me know if you see any difference with these settings. Mike On 7/17/07, Jiming [EMAIL PROTECTED] wrote: Hi Mike, I am using Windows2000/XP, and browser is IE6/IE7/Firefox2. The url you can try is http://peds2.caitco.com, this is a chinese version, hope . Please just try it at random:) When we using a powerful CPU, it is not a problem. For example my PC's CPU is AMD2600+. And it only consume about 30% CPU by using IE, 20% by using FF. And BlockUI is fast enough. But when my test engineers test the system with an old machine, which CPU less than 1Gz, blockUI will make the CPU 100% and need 2-5 seconds to wait even which real operation might only take less than 1 second. I mean there still have a lot of old machine there, and we still need consider them. What do you say? Thanks, Jiming
[jQuery] Re: blockUI plugins consume too much CPU
I add once an issue with internet explorer 6 and opacity. I was using a 1pxX1px transparent image. CPU was turned into lava until i switched to a 200x200px transparent image. Hope this helps somehow -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Alsup Sent: mardi 17 juillet 2007 17:02 To: jquery-en@googlegroups.com Subject: [jQuery] Re: blockUI plugins consume too much CPU Hmm, my corporate firewall won't let me access that site. Something you can try is to override the opacity by setting the overlayCSS.opacity value to 0 or 1. For example: $.blockUI.defaults.overlayCSS.opacity = 0; - or - $.blockUI.defaults.overlayCSS.opacity = 1; This will tell you if it is the opacity calcs and rendering that are causing the spike. If so, and you're concerned about those older less powerful machines then you'll need to decide if you can live with a fully opaque or fully transparent solution. Or if you need to find a different solution altogether. Let me know if you see any difference with these settings. Mike On 7/17/07, Jiming [EMAIL PROTECTED] wrote: Hi Mike, I am using Windows2000/XP, and browser is IE6/IE7/Firefox2. The url you can try is http://peds2.caitco.com, this is a chinese version, hope . Please just try it at random:) When we using a powerful CPU, it is not a problem. For example my PC's CPU is AMD2600+. And it only consume about 30% CPU by using IE, 20% by using FF. And BlockUI is fast enough. But when my test engineers test the system with an old machine, which CPU less than 1Gz, blockUI will make the CPU 100% and need 2-5 seconds to wait even which real operation might only take less than 1 second. I mean there still have a lot of old machine there, and we still need consider them. What do you say? Thanks, Jiming Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.8/904 - Date: 16/07/2007 17:42
[jQuery] Re: selectbox: change selected item
Klaus, As Dan pointed out, his Field plugin is very adept at getting, setting and otherwise manipulating data for field elements and Dan is adding new capabilities regularly. The Form plugin is mostly geared at providing ajax capabilities for the submit process. It also provides methods for getting and serializing field values, but there is no complementary setting or deserialization capabilities at this time. Mike On 7/17/07, Dan G. Switzer, II [EMAIL PROTECTED] wrote: Using my Field plug-in (http://jquery.com/plugins/project/field) you could do: $(#id_cliente).setValue(2); The big benefit to using my Field plug-in is that you can change the form field from a select box to a checkbox or radio element and you would not have to refactor code that grabs/sets the value of the field. -Dan Dan, that truly is an advantage. But I was of the opinion, that val() works with selects and radios as well, thus the refactoring possibility exists for core jQuery as well (of course I don't want people to stay away from your plugin by saying that). I don't believe val() is 100% cross-browser compatible for select elements. val: function( val ) { return val == undefined ? ( this.length ? this[0].value : null ) : this.attr( value, val ); }, The code only works if the element returns a value attribute. This might work in most modern browsers for a select-one element, I'm not sure what the behavior is for a select-multi element. Also, my getValue()/setValue() methods work with checkbox and radio elements (well, every field element--the only exception being the setValue() on read-only elements.) Another question (Mike, Dan?). What are the differences between form and field plugin? The Field plug-in is basically a companion/stand-alone to the Form plug-in. You don't need Mike's Form plug-in, but it works great in conjunction with Mike's code. My plug-in is geared towards reading and manipulating the form fields themselves. Methods such as the formHash() make it really easy to populate a form based upon a JSON packet. It's also the first jQuery plug-in that allowed both getting and setting the value for all form field elements. I'm also working on adding addition useful form-based UI methods. I just recently added limitSelection() (allows you to limit the number of checkbox/select elements that can be selected) and createCheckboxRange() (allows you to [SHIFT]+click to highlight a range of checkbox elements.) -Dan
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
This looks really nice. Some feedback: 1. I expect the contents to open to the right of it's header, not to the left. Is that configurable? And if not, it'd be nice if you can make it so (when you make it a plugin). 2. when clicking the header for an item that's already open, I don't see why it should reopen itself. If there's not a reason I'm missing, it'd be nice to have it just not do anything (to signify that it's already open) Lookin' good! - Jack Alexander Graef wrote: Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de
[jQuery] Re: selectbox: change selected item
Mike Alsup wrote: Klaus, As Dan pointed out, his Field plugin is very adept at getting, setting and otherwise manipulating data for field elements and Dan is adding new capabilities regularly. The Form plugin is mostly geared at providing ajax capabilities for the submit process. It also provides methods for getting and serializing field values, but there is no complementary setting or deserialization capabilities at this time. Mike Thanks for clarification! Sounds like a good candidate to me to being merged?! --Klaus
[jQuery] Re: ANNOUNCE: tablesorter 2.0 beta released!
Immediately after sending the above I think I realized what the problem is. Each of the numeric values in that first column is wrapped in a/a and you're probably sorting on that. Do I need to write a parser? If so, what might it be? This should work: $.tablesorter.addParser({ id: 'genericLink', is: function(s) { var exp = /a[^]*(.*)\/a/.test(s.toLowerCase()); if(exp) this.type = (/a[^]*(\d+)\/a/.test(s)) ? 'numeric' : 'text'; return exp; }, format: function(s) { var val = s.toLowerCase().match(/a[^]*(.*)\/a/)[1]; // format your data for normalization return (this.type == 'text') ? $.trim(val) : $.tablesorter.formatFloat(val); }, type: 'text' }); It works for a element with text and numeric values. /christian
[jQuery] Re: Frequently Asked Questions (FAQ)
I don't know if you saw, but there is a link on that page (as well as the left sidebar - all pages). It's not under Getting Started, but under Support. - Richard On 7/17/07, Scott Sauyet [EMAIL PROTECTED] wrote: Richard D. Worth wrote: New wiki page: http://docs.jquery.com/Frequently_Asked_Questions This is great! I think there should be a link to this from the Getting Started list on the documentation page. I don't have authorization to edit the Main Page or whatever template is used, or I would do it myself. -- Scott
[jQuery] ANNOUNCE: Horizontal Accordion 0.51
Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Concerning 1: This can currently be changed by moving the click handler infront of the content layer, those are currently simple floats. The plugin will create those on the fly, giving you the option to place them before or after. Concerning 2: Yeah something I am currently working on, was already on my list of things to do :-) Thanks for the feedback Alexander _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jack Killpatrick Sent: Tuesday, July 17, 2007 6:33 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51 This looks really nice. Some feedback: 1. I expect the contents to open to the right of it's header, not to the left. Is that configurable? And if not, it'd be nice if you can make it so (when you make it a plugin). 2. when clicking the header for an item that's already open, I don't see why it should reopen itself. If there's not a reason I'm missing, it'd be nice to have it just not do anything (to signify that it's already open) Lookin' good! - Jack Alexander Graef wrote: Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de __ NOD32 2402 (20070717) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
[jQuery] repeated click when using .show(slow)
Hello, I've a link I'm using .show(slow) - it works fine unless I click repeatedly fast on the link - re-clicking the link while the effect is still running leads to weird results - is there a way to cancel the running effect before applying the new one or what's the best way to handle something like this. thank you in advance for your help.
[jQuery] Re: Frequently Asked Questions (FAQ)
Richard D. Worth wrote: http://docs.jquery.com/Frequently_Asked_Questions This is great! I think there should be a link to this from the Getting Started list on the documentation page. I don't know if you saw, but there is a link on that page (as well as the left sidebar - all pages). It's not under Getting Started, but under Support. No, I missed that. I'd prefer it to be more prominent, but it's great that it's there. Thanks for taking the time to put it together. -- Scott
[jQuery] Form in Thickbox window
I have a form with JavaScript validation. It is displayed in a Thickbox window and pulled from an inline div (initially hidden). For some reason, the JS form validation doesn't work. I believe it is because the ID or NAME attribute of the form elements are being changed somehow to create the Thickbox window? I went through Thickbox but couldn't find anything like that. Does it possibly duplicate the form elements and so the JS validation is looking at the original input ID? -- View this message in context: http://www.nabble.com/Form-in-Thickbox-window-tf4098540s15494.html#a11654694 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Behavior Problem
I added addClass to the behavior class, so it will recall the behaviors when addClass is called.. but they spans start out as .codeNumbersRow then you click on it and it runs the function turns it into .codeNumbersRowSelected, but for some reason when you try and click on it again it runs the .codeNumbersRow Selected behavior and not the .codeNumbersRow one like it is suppose to..?? $(.codeNumbersRow).behavior('click', function() { var lineNum = $(this).attr('id').substring(4); $ (this).removeClass(.codeNumbersRow).addClass(codeNumbersRowSelected); $ (#code+lineNum).removeClass(codeRow).addClass(codeRowSelected); }); $(.codeNumbersRowSelected).behavior('click', function() { var lineNum = $(this).attr('id').substring(4); $ (this).removeClass(codeNumbersRowSelected).addClass(codeNumbersRow); $ (#code+lineNum).removeClass(codeRowSelected).addClass(codeRow); alert($(this).attr('class')); }); Thanks!! P.S. I also tried taking addClass out of the behavior class and just put .append() on the end of each function, and the same thing happened.
[jQuery] Re: search text, find urls and list
On 7/17/07, Hugh Hayes [EMAIL PROTECTED] wrote: $extLinks.appendTo(#content); )}; It looks like the right paren ) and right curly brace } here are switched. - Richard
[jQuery] Announce: filemanager-like-view plugin (BogoFolders)
Hi, all! This morning i put together a plugin which provides a basic filemanager-like view, called BogoFolders: http://wanderinghorse.net/computing/javascript/jquery/bogofolders/ In short, it uses two HTML elements: one holds a list of icons/label (e.g., the file list) and one holds the content of the currently- selected entry from the file list. It can be considered Beta software. While there are still a number of significant missing features and a minor bug or two, it basically works as advertised. For the full list of known bugs and (potential) TODOs, see the docs in the uncompressed source file. It was tested in FF 2.x and Konqueror 3.5.7 (in Konqi, *some* icons require two clicks to activate them - no idea why). If anyone out there has MSIE (anyone? anyone? Bueller?), i would love to know if it works (or not) in IE. Same for Opera and Safari, though i must admit i honestly don't give much of a hoot if it doesn't work in those browsers. :D Happy hacking!
[jQuery] Re: Behavior Problem
Behavior binds the events (in this case a click event) for you and listens for major DOM modifications (such as adding an element) and binds the events to new elements that match the selector. In your example the only thing that changes is the class name. But lets say you made a major DOM modification too. Behavior would match the new class and bind the 'selected' click event but the previous event would still be bound also. The example you provide would be best written without using behavior at all. However this is an interesting use-case and I would like to explore it in more detail. Would you mind providing a complete example for me to dig through? Here is the example written without the use of behavior which should give you better performance and results. $('.codeNumbersRow, .codeNumbersRowSelected').bind('click', function(event) { var lineNum = $(this).attr('id').substring(4); $(this).toggleClass('codeNumbersRow').toggleClass('codeNumbersRowSelected'); $('#code'+lineNum).toggleClass('codeRow').toggleClass('codeRowSelected'); alert($(this).attr('class')); }); -- Brandon Aaron On 7/17/07, DXCJames [EMAIL PROTECTED] wrote: I added addClass to the behavior class, so it will recall the behaviors when addClass is called.. but they spans start out as .codeNumbersRow then you click on it and it runs the function turns it into .codeNumbersRowSelected, but for some reason when you try and click on it again it runs the .codeNumbersRow Selected behavior and not the .codeNumbersRow one like it is suppose to..?? $(.codeNumbersRow).behavior('click', function() { var lineNum = $(this).attr('id').substring(4); $ (this).removeClass(.codeNumbersRow).addClass(codeNumbersRowSelected); $ (#code+lineNum).removeClass(codeRow).addClass(codeRowSelected); }); $(.codeNumbersRowSelected).behavior('click', function() { var lineNum = $(this).attr('id').substring(4); $ (this).removeClass(codeNumbersRowSelected).addClass(codeNumbersRow); $ (#code+lineNum).removeClass(codeRowSelected).addClass(codeRow); alert($(this).attr('class')); }); Thanks!! P.S. I also tried taking addClass out of the behavior class and just put .append() on the end of each function, and the same thing happened.
[jQuery] Re: search text, find urls and list
Hi Hugh, Ah, yes, looks like you're missing the line with }); that should come right before $extLinks.appendTo('#content'); It's needed there to close the .each() Try copy/pasting this: script src=http://www.helderberg-bmdc.org/scripts/jquery.js; type=text/javascript/script script type=text/javascript /* ![CDATA[ */ $(document).ready(function() { var $extLinks; $(#content a).not([EMAIL PROTECTED]'helderberg-bmdc.org/']).each(function (index) { if (index == 0) { $extLinks = $('ol id=extLinks/ol'); } var thisHref = this.href; $('li/li').text(thisHref).appendTo($extLinks); }); $extLinks.appendTo(#content); )}; /* ]] */ /script --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 17, 2007, at 10:37 AM, Hugh Hayes wrote: Hi Karl- Thanks. I really appreciate it. I've got (I think) syntax errors. The firefox console is telling me missing } after function body \n - it seems to be the last line of the code and no matter what combination of characters I use there. Here's what I've got: script src=http://www.helderberg-bmdc.org/scripts/jquery.js; type=text/javascript/script script type=text/javascript /* ![CDATA[ */ $(document).ready(function() { var $extLinks; $(#content a).not([EMAIL PROTECTED]'helderberg-bmdc.org/']).each(function (index) { if (index == 0) { $extLinks = $('ol id=extLinks/ol'); } var thisHref = this.href; $('li/li').text(thisHref).appendTo($extLinks); $extLinks.appendTo(#content); )}; /* ]] */ /script I'm serving the files up as xhtml 1.1 with mime-type application/ xhtml+xml for the browsers that understand it and text/html (html 4.01) for the browsers that don't. The page validates and there's no css errors. Thanks in advance for anyone's hints, tips or fixes. Take care. Hugh - Original Message - From: Karl Swedberg To: jquery-en@googlegroups.com Sent: Monday, July 16, 2007 4:05 PM Subject: [jQuery] Re: search text, find urls and list Hi Hugh, You might want to use the .each() method for this so you can iterate through the links and create new elements as you go. Something like this should work: var $extLinks; $(#content a).not([EMAIL PROTECTED]'mysite.com/']).each(function(index) { if (index == 0) { $extLinks = $('ol id=extLinks/ol'); } var thisHref = this.href; $('li/li').text(thisHref).appendTo($extLinks); }); $extLinks.appendTo(#content); --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 16, 2007, at 3:39 PM, Hugh Hayes wrote: Hi All- This is a newbie designer question. I think jquery's great and I'm trying to find more uses for it. I've got this- $(#content a).not([EMAIL PROTECTED]'mysite.com/']).clone().appendTo (#content); I was trying to get a line break in between each link but couldn't and I was hoping somebody here could give me a hand. I'm trying to learn so I'm trying to do this step-by-step. I've been reading the doc's and see that $(a) going to pick up the anchors. I saw .getUrlParam and tried .getUrlParam(href) but was only able to get strHref has no properties. It's probably obvious but what I'm trying to do is go through the content div, collect all the external http:... addresses and put them into a ul or ol at the bottom of the page. I just want to make it easy for people to copy them. Thanks and thanks for jquery. When you're doing sites by yourself it's hard to add the kind of enhancements that jquery offers. Thanks again, Hugh
[jQuery] Re: IE ONLY warning on fadeIn
Nicely done, thanks. On Jul 16, 6:19 pm, Dave Methvin [EMAIL PROTECTED] wrote: On Jul 16, 5:23 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I keep getting an error in the IE browsers (6 7). Error: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus. $(#advsect).removeClass(hidden); // unhide ad $(#advsect).animate({height:200},1000); $(#advsect).fadeIn(500); // show ad $(#advsect).focus(); // put focus back on ad I think what is probably happening is that the two queued effects (animate and fadeIn) haven't started at the point you try to set focus on the element. If you wanted height and opacity simultaneously then you should try to do them together in a single animate. Then do the .focus() in a callback function on the animate. Something like this: $(#advsect) .removeClass(hidden) .css({opacity: 0}) .animate({height:200, opacity:1}, 1000, function(){ this.focus(); }); BTW, If I add 'alert(hello world);' anywhere between the { and } of the #advtab.mousedown above I don't get a warning. That probably gives it time to do the animation before it sets focus.
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Not sure why this got posted multiple times, only submitted once. Sorry Alexander _ From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alexander Graef Sent: Tuesday, July 17, 2007 5:12 PM To: jquery-en@googlegroups.com Subject: [jQuery] ANNOUNCE: Horizontal Accordion 0.51 Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de __ NOD32 2402 (20070717) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com
[jQuery] Re: ANNOUNCE: Horizontal Accordion 0.51
Great Job!!! And great design for the accordion ;D On 7/17/07, Alexander Graef [EMAIL PROTECTED] wrote: Hi, Did some updates to the way the horizontal accordion works. You can find the new download and example here: http://dev.portalzine.de/index?/Horizontal_Accordion--print I will be moving this to a plugin for a more generic approach for version 0.6. Enjoy Alexander - portalZINE(R)- innovation uncovered http://www.portalzine.de dev.portalZINE(R) - all about development http://dev.portalzine.de pro.portalZINE(R) - customized experience http://pro.portalzine.de -- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com
[jQuery] Re: Compressed BlockUI plugin?
thanks aaron, just in case you need my email, it is ganeshread at gmail dot com. -GTG On 7/17/07, Aaron Porter [EMAIL PROTECTED] wrote: I'll try to package it up and make it available tomorrow. Aaron Ganeshji Marwaha wrote: Aaron, I would like the jar file... I want to integrate this packer along with my ant build script... -GTG On 7/14/07, *Aaron Porter* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I just ran some tests against the current version from SVN to see how fast they load on my machine. Firefox 2.0.0.4 http://2.0.0.4 on Linux: jquery.js (original uncompressed) - 158243 bytes: 66ms jquery.pack.js - 21585 bytes: 129ms jquery.compressed.js (my compressor) - 17005 bytes: 394ms IE6 on XP under VMWare on the same Linux machine: jquery.js (original uncompressed) - 158243 bytes: 15ms jquery.pack.js - 21585 bytes: 62ms jquery.compressed.js (my compressor) - 17005 bytes: 171ms On a 56K modem my version will be faster on the first load then the packed version will be faster on subsequent loads. It all depends on what you're after. I haven't made the source available yet but that's something I'm considering. I'll need to clean it up first. I could get you a jar file (it's written in Java) if you're interested. Aaron Michael Geary wrote: Sounds interesting, Aaron, thanks for the pointer. Two questions: How is the unpacking speed? I don't care how long it takes to pack the code (within reason), but unpacking speed is very important, especially on slow machines like an iPhone/Nokia/Windows Mobile phone. I saw a test report that seemed to indicate that Dean's packer took 1.5 seconds to unpack jQuery on the iPhone, which is way too slow. I would gladly take a slower packing time to get faster unpacking. Is the source code available? I can't use a compressor that I have to go to a website to use. That's fine for testing, but for production use I need to be able to integrate it into my build process and have it available at all times. Thanks, -Mike From: Aaron Porter I know Dean Edward's packer has already been suggested but you can try my compressor if you'd like: http://www.scriptingmagic.com/Topics/Compression/JavaScript%20Compressor/ My compressor is slower than packer but the results will be smaller. It also doesn't have a problem with things like missing semi-colons at the end of lines because it uses Rhino for the first pass which cleans everything up.
[jQuery] Re: Behavior Problem
I switched it to this and it seems to work correctly: $(.codeNumbersRow, .codeNumbersRowSelected).behavior('click', function() { var rem = ; var add = ; if($(this).attr('class') == codeNumbersRowSelected) rem = Selected; else add = Selected; var lineNum = $(this).attr('id').substring(4); $ (this).removeClass(codeNumbersRow+rem).addClass(codeNumbersRow+add); $ (#code+lineNum).removeClass(codeRow+rem).addClass(codeRow+add); alert($(this).attr('class')); }); On Jul 17, 1:19 pm, DXCJames [EMAIL PROTECTED] wrote: I added addClass to the behavior class, so it will recall the behaviors when addClass is called.. but they spans start out as .codeNumbersRow then you click on it and it runs the function turns it into .codeNumbersRowSelected, but for some reason when you try and click on it again it runs the .codeNumbersRow Selected behavior and not the .codeNumbersRow one like it is suppose to..?? $(.codeNumbersRow).behavior('click', function() { var lineNum = $(this).attr('id').substring(4); $ (this).removeClass(.codeNumbersRow).addClass(codeNumbersRowSelected); $ (#code+lineNum).removeClass(codeRow).addClass(codeRowSelected); }); $(.codeNumbersRowSelected).behavior('click', function() { var lineNum = $(this).attr('id').substring(4); $ (this).removeClass(codeNumbersRowSelected).addClass(codeNumbersRow); $ (#code+lineNum).removeClass(codeRowSelected).addClass(codeRow); alert($(this).attr('class')); }); Thanks!! P.S. I also tried taking addClass out of the behavior class and just put .append() on the end of each function, and the same thing happened.
[jQuery] Announce: Confirmer plugin
Hi again, all! Confirmer is a plugin for jQuery which implements a novel approach to the process of confirming an action. Normally this is achieved via a yes/no dialog box or a button with a confirm checkbox next to it. The Confirmer plugin instead sets up a single button which changes to a confirm the action state if it is clicked one time. If the button is clicked again within a specified time then the action is confirmed, otherwise it times out and returns to its initial state. http://wanderinghorse.net/computing/javascript/jquery/confirmer/ Includes a live demo link. Happy hacking!
[jQuery] Re: selectbox: change selected item
Klaus, Dan, thank you for your help. I tried both ways and they worked correctly. I think I will use the Field plugin for many things in the future. Thank you! On 17 jul, 18:37, Klaus Hartl [EMAIL PROTECTED] wrote: Mike Alsup wrote: Klaus, As Dan pointed out, his Field plugin is very adept at getting, setting and otherwise manipulating data for field elements and Dan is adding new capabilities regularly. The Form plugin is mostly geared at providing ajax capabilities for the submit process. It also provides methods for getting and serializing field values, but there is no complementary setting or deserialization capabilities at this time. Mike Thanks for clarification! Sounds like a good candidate to me to being merged?! --Klaus
[jQuery] Re: Announce: Confirmer plugin
Very handy! Will be very useful for actions such as deleting. I'll be trying this one out. On 7/17/07, Stephan Beal [EMAIL PROTECTED] wrote: Hi again, all! Confirmer is a plugin for jQuery which implements a novel approach to the process of confirming an action. Normally this is achieved via a yes/no dialog box or a button with a confirm checkbox next to it. The Confirmer plugin instead sets up a single button which changes to a confirm the action state if it is clicked one time. If the button is clicked again within a specified time then the action is confirmed, otherwise it times out and returns to its initial state. http://wanderinghorse.net/computing/javascript/jquery/confirmer/ Includes a live demo link. Happy hacking! -- Tane Piper http://digitalspaghetti.tooum.net This email is: [ ] blogable [ x ] ask first [ ] private
[jQuery] Re: Announce: Confirmer plugin
Very cool idea. Anything to get rid of confirmation dialogs! I see one problem: Many people habitually double-click everything - links, buttons, you name it. If you double-click the button, the second click ends up confirming it. You could avoid this by disabling the button for a second with a Wait label on it, and then re-enabling it with the confirm label. That might be a little annoying, but probably not too bad, and it would keep the double-clickers out of trouble. -Mike From: Stephan Beal Confirmer is a plugin for jQuery which implements a novel approach to the process of confirming an action. Normally this is achieved via a yes/no dialog box or a button with a confirm checkbox next to it. The Confirmer plugin instead sets up a single button which changes to a confirm the action state if it is clicked one time. If the button is clicked again within a specified time then the action is confirmed, otherwise it times out and returns to its initial state. http://wanderinghorse.net/computing/javascript/jquery/confirmer/ Includes a live demo link.
[jQuery] Re: Announce: Confirmer plugin
On Jul 18, 12:35 am, Tane Piper [EMAIL PROTECTED] wrote: Very handy! Will be very useful for actions such as deleting. I'll be trying this one out. Deleting is EXACTLY the reason i wrote it. i have an app with a Delete all button and a Confirm checkbox next to it (because i didn't know that browsers support a confirm() function!), which is a typical solution for PHP-based apps. This allows a much cleaner solution, though. :D
[jQuery] Re: Announce: Confirmer plugin
On Jul 18, 12:40 am, Michael Geary [EMAIL PROTECTED] wrote: Very cool idea. Anything to get rid of confirmation dialogs! i didn't come up with the idea myself (of course). There is/was some mail client (can't remember which) which uses/used a similar idea when you move a mail to the trash. After clicking the Delete button to move a mail to the Trashcan, the button changes to Undo Delete until you take another action, at which point it reverts back to a Delete button. If you click Undo before doing anything else then you can undo the delete. i never actually used the app, but read about that feature in some UI design article a few years ago. I see one problem: Many people habitually double-click everything - links, buttons, you name it. If you double-click the button, the second click ends up confirming it. That's an interesting point. i've been using KDE in single-click mode for many years, so i haven't actually double-clicked anything since i had (was forced) to use Windows some time in 2006... thus i didn't consider the posibility that so many people double-click out of habit. Once you get used to single-clicking everything, double-clicking becomes tedious and seems downright barbaric. Now that i think about it, i'm constantly saying to my g/f, don't DOUBLE-click those links! That causes two hits on the server! as if she might someday magically understand what i mean by that. :/ You could avoid this by disabling the button for a second with a Wait label on it, and then re-enabling it with the confirm label. That might be a little annoying, but probably not too bad, and it would keep the double-clickers out of trouble. That's a very good idea. A 500ms wait shouldn't be a big deal. i'll take a look at how that might be made configurable. The only potential problem i can think of with that is that it might require, as a target, an element for which a disabled state is possible (e.g. a button), whereas the current implementation can be applied to other elements (in theory, any elements for which click() and html() are valid).
[jQuery] Re: Announce: Confirmer plugin
Cool idea. Just add support for a class that's being added to the button when in 'confirm' mode - otherwise there is no way to visually highlight this new UI approach for the user ; ). -- Felix -- My Blog: http://www.thinkingphp.org My Business: http://www.fg-webdesign.de Stephan Beal wrote: Hi again, all! Confirmer is a plugin for jQuery which implements a novel approach to the process of confirming an action. Normally this is achieved via a yes/no dialog box or a button with a confirm checkbox next to it. The Confirmer plugin instead sets up a single button which changes to a confirm the action state if it is clicked one time. If the button is clicked again within a specified time then the action is confirmed, otherwise it times out and returns to its initial state. http://wanderinghorse.net/computing/javascript/jquery/confirmer/ Includes a live demo link. Happy hacking!
[jQuery] Resizable textarea
Does anyone could combine a textarea with a Drag and Resize plugin to create a Resizable Textarea. (A feature like this is available in TinyMCE). Thanks. Mark
[jQuery] Re: Announce: Confirmer plugin
On Jul 18, 12:47 am, Felix Geisendörfer [EMAIL PROTECTED] wrote: Cool idea. Just add support for a class that's being added to the button when in 'confirm' mode - otherwise there is no way to visually highlight this new UI approach for the user ; ). My initial thought was to use an onclick callback so the user could modify the element using an arbitrary animation, but you're right - adding a class is a good generic solution without the usage overhead of a callback. i've added this to the TODO list. Thanks :).
[jQuery] Re: Announce: Confirmer plugin
Stephan, In the demo, once i click, the action gets cancelled too quickly before i understand that i need to click it again... Also, i guess it is pretty difficult to explain this to the user... There should be some other way, instead of just time before which the event is cancelled. Just thinking out loud, maybe something like clicking outside the button cancels it... i dont know I know, we can increase the timing there, but still, i am not sure if the timing approach is the best for confirm kinda dialog. For undo style dialogs that probably is a better idea... Just something to ponder... -GTG On 7/17/07, Stephan Beal [EMAIL PROTECTED] wrote: On Jul 18, 12:47 am, Felix Geisendörfer [EMAIL PROTECTED] wrote: Cool idea. Just add support for a class that's being added to the button when in 'confirm' mode - otherwise there is no way to visually highlight this new UI approach for the user ; ). My initial thought was to use an onclick callback so the user could modify the element using an arbitrary animation, but you're right - adding a class is a good generic solution without the usage overhead of a callback. i've added this to the TODO list. Thanks :).
[jQuery] Re: Announce: Confirmer plugin
Just minutes after typing the email for u, i realized that i had seen a pretty cool site from which your plugin can gather some inspiration. This site allows you to completely interact with any UI without any clicks at all. Along similar lines, once a user clicks the button, an extention slides out, asking to confirm, and if you click that extention, you got your confirmation. Oops, i almost forgot the link - http://www.dontclick.it/ -GTG On 7/17/07, Stephan Beal [EMAIL PROTECTED] wrote: On Jul 18, 1:43 am, Ganeshji Marwaha [EMAIL PROTECTED] wrote: In the demo, once i click, the action gets cancelled too quickly before i understand that i need to click it again... Also, i guess it is pretty difficult to explain this to the user... You're right - i had the timeout delay set very low because when testing it it gets really annoying to wait a full 3 seconds (the default timeout period). i've re-set it to 3000ms. There should be some other way, instead of just time before which the event is cancelled. That would involve adding another UI element, which is part of what i was trying to avoid. Any ideas which don't involve an extra UI element or dialog? Just thinking out loud, maybe something like clicking outside the button cancels it... i dont know That could have weird semantics in some use cases: Let's say i have a Delete Object button which performs the delete UNLESS i confirm the action (that is, it's usage is backwards - i'm going to delete unless you cancel the deletion by clicking the confirm button). Granted, that would be an unusual use case, but users often come up with weird things to do. Stealing a click like that could lead to other confusion, as the widget the user actually clicked on (a hyperlink, form control, or other button) doesn't get the click. We might be able to pass on the click by figuring out what the coordinates are, but that gets very ugly very quickly. Also, i'm not 100% sure that i could get the click-anywhere event handling working cross-browser. i only have Linux machines, so i can't test on the most popular (MSIE) and most esoteric (Safari) browsers. A quick look at the subject lines of the last 100 posts in this forum suggest that about 20-30% of the users have some sort of problem which applies on to MSIE, and i don't want to do anything in jQuery which is so tricky that the world's most popular browser cannot handle it. I know, we can increase the timing there, but still, i am not sure if the timing approach is the best for confirm kinda dialog. For undo style dialogs that probably is a better idea... Just something to ponder... In principal i agree with what you're saying, but i don't think the click-anywhere-else is the proper solution, and i don't have any ideas which don't involve an extra UI element or dialog box. i'm open to suggestions. Keep in mind that this particular plugin is intended to be light-weight and free of dependencies on other plugins (e.g. Dimensions would be useful for the click-anywhere support, i think).