[jQuery] Re: Is there a more efficient Method.
That might work. You could bind each child div with a custom event that would have it update itself from the passed in data. Then you could just trigger the event for that parent element. It would be interesting to see if it's faster since it doesn't have to search for the child selectors each time. Something like Setup: When page loads $(ClassChild).bind(update, function(E){UpdateChild(this, E);}) function UpdateChild (child, E) { $(child).html(E.data[$(child).className]); } Trigger: after new data is recieved. $(#C2 .ClassChild).trigger({type:update, E: data});
[jQuery] problem on fadeIn with flash
I've tried to use fade in for a div that contain a flash. But there is a split second right before it fadein, it has a sparkling white piece at there. (see kenportfolio.com) Does anyone know how to fix that issue, or even fixable? Remind you to use Konami code to see the fadeIn effect. Code: $('#swfobject').fadeIn('slow'); div id=swfobject style=display: none; object id=FlashID classid=clsid:D27CDB6E-AE6D-11cf- // I used dreamweaver CS4 to embed it /object /div Thanks if anyone has suggestions.
[jQuery] Re: Trying to grasp basics of scrolling a TBODY
Jeffrey Kretz wrote: Ken, Do you have a test case page online somewhere I could take a look at? I've successfully implemented a scrollTo-type function using offsets and rows, and if I can see the page you're working with I might be able to suggest something. Jeffrey, thanks but I actually figured it out. I made up a simple test, which I'll be happy to post probably tomorrow. What I realized is that there were a few more steps than I thought. I had figured that a TR would get an offset() automatically with respect to its TBODY. Instead I found I had to get the offset() (or position, I forget which one) for several items, and do a little arithmetic to get the position of the TR relative to its TBODY. Once I figured that out the remaining arithmetic was fairly straightforward. Also I realized I had to take into account the height of the TR, otherwise I would scroll to the top of it and it would still be invisible :) JK *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Kenneth Downs *Sent:* Sunday, November 02, 2008 3:58 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: Trying to grasp basics of scrolling a TBODY Dan Switzer wrote: Ken, I'm trying to grasp the basics of scrolling to a particular row in a TABLE. Let's say you've got a TABLE, with a TBODY that has a fixed height and overflow: scroll. It appears I ought to be able to use core functions like offset() and scrollTop() to work out where a row is and scroll the TBODY to that position, but lots of trial and error has left me lost on why these things don't seem to work as I expect. The particular case I am looking at involves the user using arrow keys to navigate up and down. Its easy enough to use .next() to highlight the next row, but if a user keeps doing it, and the next row is below the viewable scroll region, I need to be able to slide up the display to show the highlighted row. This is an educational venture, not a practical one, I'd like to understand it myself, not find and use a plugin that does it already. Scrolling with the TBODY tag is spotty. IE6 doesn't support it at all--you need to place your table in a DIV that has a fixed height and overflow set to scroll. Thankfully I have no interest in IE 6 :) I currently have the DIV system you describe. My best construction of why it does not work is this: 1) There is a div that represents TBODY. It has clear:both as a CSS row 2) Each row is a div inside of the TBODY div 3) Each cells must be a div, firefox does not support widths on spans (don't know about IE, doesn't matter if firefox won't do it) 4) The cells must be float: left 5) ...and at the end I get .offset() returning meaningless numbers for the row divs. All divs in the body return 0 as the offset. 6) For good measure, the .scrollTo() extension does not work at all on this simulated TABLE, which I suspect is related to these bogus numbers. 7) I *think* the clear:both on the tbody div is causing this, but I really don't know So I monkeyed up a TABLE by hand and found all of the .offset() and related functions appear to be giving real results, I just can't quite connect the dots on how to put it all together. FWIW, the only reason I used the entire simulated TABLE was because IE 7 does not support onclick() on a TR. But I can just as well put the onclick on TD elements and get where I need to go using a TABLE, if only I could connect the dots on the scrolling stuff. I'm not sure what browsers you're targeting, but if IE6 was one you were having problems with, this is why. -Dan -- Kenneth Downs Secure Data Software, Inc. www.secdat.com http://www.secdat.comwww.andromeda-project.org http://www.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010 -- Kenneth Downs Secure Data Software, Inc. www.secdat.comwww.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010
[jQuery] watch window problems and ideas
I'm a newbie, using VS and firebug debuggers as I learn jQuery. I find it very helpful to pause at various breakpoints and experiment with jQuery chains to see what works. But I find that the results aren't always consistent. Especially in IE. Examples: $('li') result is empty jQuery $('LI') result is jQuery with 9 elements $('li').get()result is array with 9 elements Can anyone explain these inconsistencies? Any warnings / suggestions about how to make the best use of the watch window? Many thanks, Ken
[jQuery] Re: Trying to grasp basics of scrolling a TBODY
Dan Switzer wrote: Ken, I'm trying to grasp the basics of scrolling to a particular row in a TABLE. Let's say you've got a TABLE, with a TBODY that has a fixed height and overflow: scroll. It appears I ought to be able to use core functions like offset() and scrollTop() to work out where a row is and scroll the TBODY to that position, but lots of trial and error has left me lost on why these things don't seem to work as I expect. The particular case I am looking at involves the user using arrow keys to navigate up and down. Its easy enough to use .next() to highlight the next row, but if a user keeps doing it, and the next row is below the viewable scroll region, I need to be able to slide up the display to show the highlighted row. This is an educational venture, not a practical one, I'd like to understand it myself, not find and use a plugin that does it already. Scrolling with the TBODY tag is spotty. IE6 doesn't support it at all--you need to place your table in a DIV that has a fixed height and overflow set to scroll. Thankfully I have no interest in IE 6 :) I currently have the DIV system you describe. My best construction of why it does not work is this: 1) There is a div that represents TBODY. It has clear:both as a CSS row 2) Each row is a div inside of the TBODY div 3) Each cells must be a div, firefox does not support widths on spans (don't know about IE, doesn't matter if firefox won't do it) 4) The cells must be float: left 5) ...and at the end I get .offset() returning meaningless numbers for the row divs. All divs in the body return 0 as the offset. 6) For good measure, the .scrollTo() extension does not work at all on this simulated TABLE, which I suspect is related to these bogus numbers. 7) I *think* the clear:both on the tbody div is causing this, but I really don't know So I monkeyed up a TABLE by hand and found all of the .offset() and related functions appear to be giving real results, I just can't quite connect the dots on how to put it all together. FWIW, the only reason I used the entire simulated TABLE was because IE 7 does not support onclick() on a TR. But I can just as well put the onclick on TD elements and get where I need to go using a TABLE, if only I could connect the dots on the scrolling stuff. I'm not sure what browsers you're targeting, but if IE6 was one you were having problems with, this is why. -Dan -- Kenneth Downs Secure Data Software, Inc. www.secdat.comwww.andromeda-project.org 631-689-7200 Fax: 631-689-0527 cell: 631-379-0010
[jQuery] Re: jqMock - mock library for jqUnit / QUnit
Hi Colin, Really great to hear back from you! Regarding your question, jqMock can test that functions on one particular object are executed in a particular order (see section on Ordered and Unordered Expectations in user guide). However, the ordering is maintained within the mock for that object, so there is currently no support for ordering among multiple mocks. Totally agree about putting jqUnit back into Qunit, as it is much too hard to maintain 2 versions of what is essentially the same codebase. At the moment, I'm not sure whether I should continue with jqMock, considering that you are the only person who has noticed it =) I've spent way too much time on it already, and JS is moving so quickly these days, such much other stuff to try out! Thanks again for the feedback! Keep me posted on how it goes with QUnit. I'm quite familiar with the QUnit codebase so I'd be happy to help out with anything. cheers, Ken -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Colin Clark Sent: Thursday, 4 September 2008 6:30 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jqMock - mock library for jqUnit / QUnit Hey Kenneth, On 20-Aug-08, at 5:54 AM, fuzziman wrote: I've recently released a mock library for the jqUnit framework. It is intended to be a lightweight javascript Mock Framework, and allows dependent functions such as native alert dialogs to be mocked and tested in isolation. I hope this library can be useful for real life usage. Please have a look, there's really detailed documentation and a user guide. I'm looking forward to any code reviews and feedback! Hosted on google code at http://code.google.com/p/jqmock/ http://code.google.com/p/jqmock/ This is really impressive! Very cool stuff, and with excellent documentation. I'll definitely be using it in my tests. A quick question: I'd love to be able to use jqMock to test the sequence of a set of function calls. So, for example, I'd like to be able to test that one function is always called before another function. I've hacked this up in a very simplistic way, but this seems like a perfect use for mocks. Is this possible in the current version of jqMock? And a comment: I've been talking a bit with Jörn Zaefferer about merging anything of interest from jqUnit into QUnit now it is supported as a top-level API. While I haven't heard back from him recently, I'm looking forward to the prospect of jqUnit going away entirely in place of QUnit, since I never intended it as a product in itself. I've offered to help in any way I can. Keep up the good work. I'm looking forward to seeing the new features you add to jqMock in the future! Colin --- Colin Clark Technical Lead, Fluid Project http://fluidproject.org NOTICE This e-mail and any attachments are confidential and may contain copyright material of Macquarie Group Limited or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Group Limited does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Group Limited.
[jQuery] Re: Firefox 3 beta
ah great, that is quite good news, we will try the new release of jquery 1.2.3 wednesday, i ll keep you posted. Thx for the quick response. Kenneth On 7 feb, 18:23, John Resig [EMAIL PROTECTED] wrote: Are you .load()ing HTML with a JavaScript snippet in it? If so, then that's a bug in Firefox 3 and it will be resolved before release. Or you could use jQuery 1.2.2 and newer - which will work with Firefox 3 just fine. --John On Feb 7, 2008 5:01 AM, kenneth [EMAIL PROTECTED] wrote: Hello everybody I recently installed the new beta version of firefox 3 I thought it would accept everything we are now designing on a new website but unfortunatly it doesn't accept all jquery code. for example: .load of a specific php file in an other div doesn't seem to work anymore. This is quite a problem. Are there going to be fixes in Jquery for firefox 3? or is this a symptom that will dissapear when there is an official release of firefox? These changes are quite important for us, and i guess for thousand other users... thx in advance kind regards K
[jQuery] Firefox 3 beta
Hello everybody I recently installed the new beta version of firefox 3 I thought it would accept everything we are now designing on a new website but unfortunatly it doesn't accept all jquery code. for example: .load of a specific php file in an other div doesn't seem to work anymore. This is quite a problem. Are there going to be fixes in Jquery for firefox 3? or is this a symptom that will dissapear when there is an official release of firefox? These changes are quite important for us, and i guess for thousand other users... thx in advance kind regards K
[jQuery] Re: Another IE Sliding bug, the weirdest (some elements disappear and others not on SlideDown)
Just a wild guess, try sticking content that disappears into its own div inside the toggle div. i only took a quick minute to look but that might do it On 1/27/08, Arkilus [EMAIL PROTECTED] wrote: While building my application with jQuery I found out this really weird internet explorer bug: Applying SlideDown to elements that are relative positioned or that have relative positioned parents, some elements just disappears. This behaviour may be checked at http://www.arkilus.blogspot.com and a clean html at http://paste.lymas.com.br//?q=22246 Performing some tests i found out some actions that bring that elements back: - Edit ANY css property live with IE Devoloper Toolbar - Fade effects in any part of the page - While the slider is sliding up This is so far the weirdest IE bug I could notice.
[jQuery] Re: Manipulate Element After Being Added to DOM
From what you described, you are adding the element after you have bound an event. So your code is really doing: 1. bind function to click event of some element 2. add some element to the dom you can clearly see the event wont get attached to the element. you'll either have to call the code again after the element is added; or i would suggest looking at event delegation From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Matt Quackenbush Sent: Monday, 21 January 2008 1:45 PM To: jquery-en@googlegroups.com Subject: [jQuery] Manipulate Element After Being Added to DOM Hello, I'm working on a form that allows the user to click an Add an Item button in order to add another item to their order. When this button is clicked, I have jQuery add another couple of fields to the form, so the user can input the data. Along with the added form fields, a Remove This Item button is also added to the DOM. All of this portion works nicely. It's the reverse that I'm having trouble with. What I'm trying to do is to call empty() on the container of the clicked Remove This Item button (actually, an anchor). I am getting no errors at all in FireBug, but when the anchor is clicked, the jQuery script is completely ignored and the browser follows the link. So, my question is: does jQuery support manipulation of an element that has been added to the DOM via Javascript? I would assume that it does, but I'm not understanding why my remove function (code below) is being ignored. $(a.remove-item).click(function() { var splt = $(this).attr(id).split(-); var n = splt[1]; $(#container- + n).empty(); return false; }); Thanks in advance, Matt NOTICE This e-mail and any attachments are confidential and may contain copyright material of Macquarie Group Limited or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Group Limited does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Group Limited.
[jQuery] Re: Accessing dynamically created divs
On 10/11/07, Yasmary Mora [EMAIL PROTECTED] wrote: Hello! Got a question that I havn't been able to answer. This is my last resort. :) So, I have a list of dynamically created divs, with a link next to them to show or hide text inside of it. I know how to do it when its only a single box, but I dont know how to do it with a dynamic list. The whole script gets created with php, so I don't know how many divs there'll be. Normally I do the whole thing with javascript but I really like jQuery, and I wanted to try to stick to using it. So the result of the php script is something like this: a href=# id=showtxt[1]show text/adiv id=textbox[1]Text here/div a href=# id=showtxt[2]show text/adiv id=textbox[2]Text here/div a href=# id=showtxt[3]show text/adiv id=textbox[3]Text here/div a href=# id=showtxt[4]show text/adiv id=textbox[4]Text here/div The jQuery code I have works for only one box... $('#showtxt').click(function() { $('#textbox').slideToggle(400); return false; }); I've tried for the past 2 hours to figure it out, and I've had no luck. I think I might be using the wrong wording to describe my problems, but either way I have no idea exactly what I'm looking for. Any help is appreciated. :o) Thanks in advance! -- -Yasmary Here is one way it could be done: $([EMAIL PROTECTED]'showtxt']).click(function() { var i = this.id.match(/showtxt\[(\d)+\]/); if (!!i[1]) { var $textBox = $([EMAIL PROTECTED]'textbox[+i[1]+]']); if (!!$textBox) $textBox.slideToggle(400); } return false; }); Note: in your example HTML, it looks like you left off the opening quote on the showtxt ID.
[jQuery] Re: [OT] A Good Cause: AIR (Accessibility Internet Rally)
It's actually not my group, I'm just a participant, but I'll forward that information on.however, I can't see them changing the name from AIR since they've been using it for 10 years already. On 8/17/07, Andy Matthews [EMAIL PROTECTED] wrote: You should consider a new acronym for your group. Adobe just release a piece of software called AIR (Adobe Integrated Runtime) and they're putting lots of marketing dollars towards it. -- *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Kenneth *Sent:* Thursday, August 16, 2007 7:51 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] [OT] A Good Cause: AIR (Accessibility Internet Rally) I am reposting this from March, as this year's events are coming up really soon. Please read! :) I know many of you here share my desire to produce accessible websites, so what more can we do though, besides that which we practice in our current roles? Well, for those of you who would like to put your design || development skills to good use by helping a non-profit organization (NPO), you should check out AIR, hosted by Knowbility: http://knowbility.org/air/ - AIR: Accessibility Internet Rally From the site, here's the rundown of how it works: 1. Form a web design team of up to four professionals and register your team with an AIR programs in your area. 2. Choose a training dates and sign-up to receive valuable accessibility training and access to free online accessibility testing software. Participants MUST attend the basic training. All registered team members also have the option to attend advanced accessibility training, which includes how to use CSS, javascript and other advanced technologies for maximum accessibility. 3. Attend the matching kickoff party and meet your nonprofit client. 4. Use the lead time to plan the site with your nonprofit partner. 5. Attend the Rally Day, collect your T-shirt and goody bag and build your entry web site for your nonprofit partner. 6. Come to the awards dinner and celebrate the good work of everyone and recognize the winners...which might be you! I'm not sure about the other cities, but I know AIR:Austin takes place in the fall. Also, there are other modes of participation, such as volunteering to help run the event, or program sponsorship. Also from the site, here's a list of 10 reasons why you should participate: 1. Your whole team gets the bonding experience of learning together how and why to make web sites accessible to people with disabilities (and PDAs and cell phones, and...) 2. All the coolest people have participated - frog design, Catapult Systems, MediaTruck, Bazzirk, IBM, Dell, Team Navanax, Nion, many many more. 3. Networking - get up close and personal with your peers in the industry and some of the very artists who keep Austin weird. 4. Access to new accessible design tools - and the folks who make them. 5. AIR judges are experts and become your friends. 6. Progress party, kickoff party, wrap party, awards party - BIG FUN! 7. A copy of the definitive accessibility book - Maximum Accessibility - is given to each team. 8. Your work featured in all AIR-Austin publicity. 9. Do good for a nonprofit arts, environment, or social service organization. 10. You could win!
[jQuery] Re: Solving the Back button problem
On 7/18/07, S. Robert James [EMAIL PROTECTED] wrote: Solving the Back button problem Is there a way to use JavaScript to detect whether a page is being loaded for the first time (from the server), or because someone hit the Back button? Often you want to display a status message only one, but not show it when they hit the Back button. The history/remote plugin could possibly handle that. http://www.stilbuero.de/jquery/history/ Someone with more experience with the plugin could probably tell you.
[jQuery] Re: Integrating Google Internal Site Search using jquery
On 6/27/07, Sean Catchpole [EMAIL PROTECTED] wrote: Hi, I don't really see the point of making this a jQuery plugin, it's very straightforward as is. Now perhaps if the searches where returned via ajax then that's a different story. ~Sean Actually you may not even need jQ for such: http://code.google.com/apis/ajaxsearch/ (be sure to play with the different demos, I have one or two bookmarked that I use often)
[jQuery] Re: Javascript: OOP help, accessing parent objects
On 6/25/07, Christof Donat [EMAIL PROTECTED] wrote: Hi, C++ ... (new Container()).containedObj.method1(); //How could method1 ever access varA? OOps, this shopuld of course read (new Container())-containedObj.method1(); Christof I don't post much, but I must say that's pretty funny! hah. Some really nice help too, I've been following along soaking in the foreign languages :)
[jQuery] Re: Adding AJAX(?) functionality to existing site... do I make new server files?
On 6/12/07, Chris W. Parker [EMAIL PROTECTED] wrote: Hello, What's the standard method for fitting an existing site with AJAX functionality? Currently all my server side files that process requests, like deleting rows from a database (e.g. customers, products, etc.), automatically redirect the user to another page with a status message (e.g. success/failure). But now that I'm trying to add some AJAX functionality to this existing site I'm not sure how to handle the server side of it. 1. Is it a better practice to create totally new AJAX specific server files? 2. Or is it a better practice to modify the existing files to know that an AJAX request is being made and that they should (1) not redirect and (2) return the data in a different format? I'm opting for #1 but I can see this might also be an issue because of the need to maintain multiple files. Chris Parker Aardvark Tactical, Inc. IT Manager 1002 W Tenth St. Azusa, CA 91702 phone: 800.997.3773 x131 fax: 626.334.6860 [EMAIL PROTECTED] I believe it is technically feasible to use either method, although one may end up being more convoluted than the other depending on your circumstances. I think it all comes down to preference and personal style (if its a solo project), or the current conventions of whatever team you may be on. What it really depends on though, IMHO, is your current coding style. Personally, I prefer OO and MVC, where I have a response object that has a boolean isAjax variable that I can check (which can be set with HTTP_X_REQUESTED_WITH, HTTP_CONTENT_TYPE, or a GET variable). The only fundamental difference in the 2 responses will be the view file, which contains the HTML of the response. If its AJAX, it only need contain information to update the DOM; otherwise, if not AJAX, it can still do anything, including redirect logic (like a redirect header). inline: sig_logo_rsml.gif
[jQuery] Re: Is it possible to chain this?
One way would be to extract the click function out: function doClick() { var getLink = $(this).prev().prev().attr(href); return getLink.slice(getLink.indexOf(r=)+2, getLink.indexOf(tp)); } Then: $('#greyLink').click(doClick); I believe that should work. On 4/29/07, Yansky [EMAIL PROTECTED] wrote: Hi guys, I was wondering about the following code and if it's possible to chain it. At the moment it works fine as is, I'm just curious if it is possible. My original code: $('#greyLink').click(function(){ var getLink = $(this).prev().prev().attr(href); return getLink.slice(getLink.indexOf(r=)+2, getLink.indexOf(tp)); }); what I've tried: $('#greyLink').click(function(){ return $(this).prev().prev().attr(href)[0].slice(this.indexOf(r=) +2, this.indexOf(tp)); }); $('#greyLink').click(function(){ return $(this).prev().prev().attr(href).this.slice(this.indexOf(r=) +2, this.indexOf(tp)); });
[jQuery] Re: manipulate div inside iframe
If your jQuery is outside the iframe, you could do: jQuery('iframe').hide(); Inside, not sure.. On 4/29/07, amircx [EMAIL PROTECTED] wrote: hey i got a script that seats inside iframe iframe src=page.php id=hideme1 how its is possible to get the id of the iframe and then hide it ? till now i have a script that knows inisde the Iframe what is the div name of the iframe . but i dont success to hide it var IfrmDiv=jQuery(frameElement.parentNode).attr('id'); i tried inside the iframe : script $(#+IfrmDiv).css(display,block); -- View this message in context: http://www.nabble.com/manipulate-div-inside-iframe-tf3665493s15494.html#a10241890 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] jQuery Tetris?!?
Not sure if the author is on this list, but awesome job either way! Check it out: http://fmarcia.info/jquery/tetris/tetris.html And vote it up if you think its good -- how could you not ;) @DZone: http://www.dzone.com/rsslinks/tetris_with_jquery.html @Digg: http://digg.com/programming/Game_Tetris_realized_by_jQuery
[jQuery] Re: jQuery Powered Sites - More Sites Added.
I am not sure if this qualifies for the list, and I was unable to find any further details as to exactly how its implemented (short on time right now), however this could be kind of a big deal: http://mail.zope.org/pipermail/checkins/2007-January/006048.html On 4/18/07, Rey Bango [EMAIL PROTECTED] wrote: Great find Jake! Added to the featured-sites list. Rey Jake McGraw wrote: Looks like http://www.fandango.com is using jQuery for a couple of things. - jake On 4/18/07, Rey Bango [EMAIL PROTECTED] wrote: Added to the list. Thanks Dylan! Dylan Verheul wrote: I just noticed a thickbox on www.bartsmit.com (big chain of toy stores in the Netherlands). On 4/10/07, Rey Bango [EMAIL PROTECTED] wrote: Added: - GameGum Free Flash Games - ToonGum ToonGum is a flash cartoon community. View, submit, and interact with our many flash cartoons and large community. - Penumbra:Overture Penumbra: Overture is a first person adventure game which focuses on story, immersion and puzzles. Keep the sites coming guys! Rey... -- -- BrightLight Development, LLC. 954-775- (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com -- BrightLight Development, LLC. 954-775- (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com
[jQuery] Re: How can I code this func fully jQuery compatible
I am not sure I understand fully, but maybe this will help? function showReplyBox(itemId,parentId) { var box = $('#comment-reply-box'); var itemBox = $('#comment-item-'+itemId); var parent_id = $('#parent_id'); parent_id.val(parentId ? parentId : itemId); $(#box).hide() $('#replybox').remove().empty().append(box).append(itemBox).appendTo( document.body) } note: in your original code, you never re-added the #replybox to the DOM.
[jQuery] Re: Quick question about the .each() function
Your initial code block: $('.wordbreakfield').each(function(){ $(this).text(); }); ...doesn't do anything with the text(). You retrieve it but it's not used. On 4/6/07, Yansky [EMAIL PROTECTED] wrote: Hi, thanks for the reply. I'm still a bit confused though. :) If $('.wordbreakfield') returns an array of jquery objects, then .each(function(){ applies a function to the raw DOM of each element, using $(this) accesses the jquery object rather than the raw DOM so we can use the text() function. So why doesn't that translate to get the text for each jquery object in the array? On Apr 6, 6:39 pm, [EMAIL PROTECTED] wrote: Because: On Apr 6, 7:58 am, Yansky [EMAIL PROTECTED] wrote: $.map(theData, function(i){ return i.childNodes[0].nodeValue; }); The .map function is returning an array of the result of each function call - in your case: return i.childNodes[0].nodeValue; You second block doesn't work because ... $(this).text(); ...isn't actually returning anything. Try this: var myData = []; $('.wordbreakfield').each(function() { myData.push($(this).text()); }); That said, you've almost got what you need with the map function var myData = $.map($('.wordbreakfield'), function() { return $(this).text(); }); Hope that helps.
[jQuery] Re: UNfocus() ?
On 4/6/07, Jörn Zaefferer [EMAIL PROTECTED] wrote: I was only suggesting a small simplification of your code. Ok, I gotcha now. Thanks Jörn!
[jQuery] UNfocus() ?
I am trying to emulate the :focus selector for IE, and I have succeeded in the initial aspect of that with the following: $inputs.each(function(){ $(this).focus(function(){ $(this).addClass('focus'); }); }); However, once the focus leaves the field, the class remains applied. Surely I don't have to manually iterate $inputs and remove .focus if it's applied, and then add it to the current input, do I? Thanks in advance for any help.
[jQuery] Re: Help to improve code
I like that alot! I just have a question though- is it supposed to reload the page on 'disable'? ...or is disable not really implemented (since you probably will only apply it)? On 4/1/07, Joan Piedra [EMAIL PROTECTED] wrote: Hey guys, I've wrote a plugin basically it adds some html wrappers to an image and crop it, making a thumbnail effect. Can you guys tell if It can be improved? I believe it's pretty stable now but I'd love to read your comments and ideas to enhace it. jQuery thumbs http://joanpiedra.com/jquery/thumbs/ Regards, -- Joan Piedra || Frontend webdeveloper http://joanpiedra.com/
[jQuery] Re: Moving to Google Groups (Finally)
I've been trying to figure this out too, and after about an hour of poking around the Google Groups Help group ( http://groups.google.com/group/Google-Groups-Guide), I don't think its possible...that, or I'm an idiot (which has been proven before). You can correspond with the list via email without any problem, however if you access the web interface it will not recognize you. The closest thing I could find to a solution was a suggestion from Google to either logout your main Google account and login under the 'new' account (your supplemental email address), or use a different browser (but still with your supplemental email address). Hopefully there's a better solution to be found. On 4/2/07, Laurent Yaish [EMAIL PROTECTED] wrote: I couldn't figure out how to get Google Groups to recognize the 2 addresses as being the same so I just sent an email to [EMAIL PROTECTED] using the email address that had the + Too bad my old posts no longer show up as being mine using my regular account, but oh well... Since Gmail allows you to create different From: address using + addressing it would make sense for them to support that in Google Groups. I'll send an email to Google Groups support later. Laurent On 4/2/07, John Resig [EMAIL PROTECTED] wrote: Yeah, I'm not sure how to merge this, either. I currently have a couple email addresses that I would like to merge too. If anyone has any idea, let us know! --John On 4/2/07, laurenty [EMAIL PROTECTED] wrote: Hey John, Google Groups doesn't seem to be smart enough about linking my email addresses... I had subscribed to the old list with laurenty+jquery@gee mail dot com, I was using plus sign addressing for filtering purposes. I can't get Google groups to realize that this is the same email address...any ideas? Thanks! Laurent jQuery rules! On Mar 31, 3:55 pm, John Resig [EMAIL PROTECTED] wrote: Trans - I think you can just remove it. The new list (jquery-en) has the entire message history in it, so that will make things easier for everyone. If you want, you can email me the user list (jeresig at gmail.com) and I'll import everyone into the new list (so that no one is lost in the process). Thanks for all of your help! --John On 3/31/07, Trans [EMAIL PROTECTED] wrote: On Mar 31, 6:12 pm, John Resig [EMAIL PROTECTED] wrote: Hey Everyone - Google has finally imported all of the users into the new jQuery Google Group. From now on, all messages should be going to the group directly instead of the old mailing list ( [EMAIL PROTECTED]). Important information: - The new jQuery mailing list is located here: http://groups.google.com/group/jquery-en - The email address to contact the list is: jquery-en@googlegroups.com Everyone's email addresses should be imported with the correct settings. If this is not the case, please let me know so that I can change it. All concerns related to the list should be sent directly to me at: jeresig at gmail.com. I'll handle everything directly. Sorry for the hassle, everyone. I'm glad that this is finally being resolved. Have a good weekend! Cool. I for one am just as happy to see this, as I prefer using Google Groups. I had set up the Google Group archive mirror for the old list. Should I leave that up for a while longer, or go ahead and remove it? ~Trans
[jQuery] Re: Web 2.0 is vulnerable to attack
I don't doubt that someone put alot of time into this particular FUD piece, but once again (just like all the other articles on this subject), no proof is given. If it's so easy, have it read an arbitrary email from my GMail and THEN I will take the arguments seriously. In the mean time, I laugh at all the the sky is falling cries. On 4/3/07, Kush Murod [EMAIL PROTECTED] wrote: Hi guys, Article below says all big JS Libraries are vulnerable including JQuery I didn't quite understand the article, but was hoping for some feedback on it http://www.cbronline.com/article_news.asp?guid=484BC88B-630F-4E74-94E9-8D89DD0E6606 Cheers, -- Kush Murod, Web applications developer Sensory Networks [E] [EMAIL PROTECTED] [W] www.sensorynetworks.com [T] +61 2 8302 2745 [F] +61 2 9475 0316 [A] Level 6, 140 William Street East Sydney 2011