[jQuery] Memory leaks forever
> > Sorry, I'm just mesmerized by this code:
[jQuery] Memory leaks forever
--- John Resig <jeresig.at.gmail.com@jquery.at.vikas.mailshell.com>
[jQuery] Namespaces & organization?
> I'm a really big fan of short code. Me too! > I'm not saying that there isn't a need for namespacing - > there definitely is and will be. I just think that we > constantly need to keep improving jQuery, keeping in > mind that short function names should be used at any cost. > That's all for now - let me know what you think on this. > - John Instead of adding lots of names in the core stuff, I'd propose using a method argument for most cases. For example, the event handling currently puts a *lot*
[jQuery] 2 features I miss
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv=Content-Type content="text/html; charset=us-ascii"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 11"> <meta name=Originator content="Microsoft Word 11"> <link rel=File-List href="cid:filelist.xml@01C650B5.BF596F90">
[jQuery] Namespaces & organization?
Has anyone thought about namespacing for JQuery? To be honest, I get confused when I see a ".get" that's for AJAX and then .draggable (example) on the same object. It may be a good idea to move stuff for organization and growth. It would required removing some of the names from the methods ($css.set instead of $.css), but that looks more clear to me. Just some ideas: $.dom.find $.event.bind $.style.addClass $.effects.toggle $.ajax.load $.plugin What do you all think? I know it's a lot of work to
[jQuery] Memory leaks forever
> I found it !!! :-D > Nothing about DOM insertion order, events, > circular references or whatever... > In $.xml, you must "nullify" xml object > at the end of onreadystatechange. Man, those closures are tricky buggers. :) Glad you found it! _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] popup with jquery
Interesting, I can see in IE just fine. I am on Windows 2003, FF 1.5.0.1 with the following extensions http://i1.tinypic.com/selvnb.jpg Wonder why I can't see it. I don't see any error in the FF Javascript console either. --- John Resig <jeresig.at.gmail.com@jquery.at.vikas.mailshell.com>
[jQuery] popup with jquery
at this link ( http://maurizio.mavida.com/demo/JsPopUpBox/JsPopUpBox.html ) you can find my little implementation of dragable js popup. there is only one function, that returns the popup div object, in this way i can use jquery to modify all i need. one exsample: var objpopup = JsPopUpBox( "Hello world" , "title") $(objpopup).css("top","50px") $(objpopup).css("left","50px") $(objpopup).fadeIn("slow") i put all css infomations inside the js code because i don't like another separated file i hope that
[jQuery] popup with jquery
I am sorry for being dense, but I don't get any popup when I visit that page. What am I missing? I am on FF 1.5.0.1 Thanks --- "maurizio@." <maurizio.at..@jquery.at.vikas.mailshell.com>, "[ mavida s.n.c. ]@." <maurizio.at.mavida.com@jquery.at.vikas.mailshell.com>
[jQuery] jQuery Visual Map
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 11"> <meta name=Originator content="Microsoft Word 11"> <link rel=File-List href="cid:filelist.xml@01C65250.C83E5F70"> <link rel=Edit-Time-Data href="cid:editdata.mso">
[jQuery] 2 features I miss
You're a legend John. Thanks very much - jQuery is the future of JavaScript! Matthew -----Original Message----- From: discuss-bounces@jquery.com [mailto:discuss-bounces@jquery.com] On Behalf Of John Resig Sent: Monday, 27 March 2006 7:15 p.m. To: matthew@delmarters.com; jQuery Discussion. Subject: Re: [jQuery] 2 features I miss Hi Matthew, I've just checked in code, to handle both of your requests, into Subversion. This means that I'll be testing them and releasing them soon, probably within the
[jQuery] New AJAX plugin - XPath on result?
> From: Michael Geary [mailto:Mike@Geary.com]
[jQuery] New AJAX plugin - XPath on result?
Sure, I follow you there. But why does the server need to send all that extra stuff? In your form example, just have the server send this: <form method="post" action="?"> <input type="text" name="name" value="John Doe" /> <input type="submit" name="save" value="Save" /> </form> And then this will work: $("p").load("/test/ajax-test.html"); There's even a name for this technique: http://microformats.org/wiki/rest/ahah -Mike
[jQuery] New AJAX plugin - XPath on result?
Phillip, your followup message indicates that you can change the format that the server returns. That being the case, why don't you just have the server return the exact text you want, instead of all the HTML cruft that you would have to strip away on the client. In your test case, the server would simply return the string "My content". Perhaps I missed something--is there a reason you couldn't do that? -Mike
[jQuery] New AJAX plugin - XPath on result?
Hi all I'm new to JQuery, and would like to use it for advanced features on an app I've already built. I've been looking at the new AJAX plugin, and particularly the .load(URI) method. What I'm wondering is whether its possible to use XPath within JQuery to limit the HTML which is pushed into the matching element to a single div within the requested page. For example, if ajax-test.html looks like this: <html> <body> <div id="header">My Page</div> <div id="content">My content</div> </body> </html>
[jQuery] jQuery Visual Map
Wow! Great! How about including something like this as documentation tree on official page, with buttons linked to its current description? I'd be usefull. We'll... when you can, John. I'm impressed with the developing speed of this project. ;) Ah!, FYI: I've implemented some JQuery stuff at job. Do you know Softonic[1]? Take a look at any screenshots page[2]. The screenshots transitions are controlled trhough JQuery. The code is prepared for do an "automatic slideshow" option that we finally didn't
[jQuery] jQuery Visual Map
<HTML> <HEAD> <TITLE>jQuery Visual Map</TITLE> </HEAD> <BODY> <FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:12.0px'>I thought some kinds of map like this can help some people. So here it is.<BR> <BR> It’s based only on what’s currently in the documentation (so doesn’t include the news ones in the blog).<BR> <BR> <BR> I am Jeffrey<BR> <BR> <BR> <BR> </SPAN></FONT> </BODY> </HTML> _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Drag-and-Drop for jQuery
I've made a drag-and-drop implementation for jQuery based on scriptaculous. There's one version you can use if you're already using Scriptaculous, and one stripped-down standalone version, that should not interfere with jQuery in any way. Plugin only: http://www.bytetastic.com/bytecore2/jquery/js/dragdrop.js Standalone: http://www.bytetastic.com/bytecore2/jquery/js/dragdropStandalone.js The standalone version is still very large. I'm going to try to do something about that, but it's a complicated
[jQuery] Memory leaks forever
> From: Dave Methvin
[jQuery] Memory leaks forever
Franck, can you point us to a complete implementation with all your code? I am hoping that if I take a look at it I will be able to understand the leak issue better. Also, doing some more research I think that the original Dean Edwards implementation of the event code in JQuery was written to avoid the memory leak issues: http://dean.edwards.name/weblog/2005/10/add-event/ http://dean.edwards.name/weblog/2005/10/add-event2/ But maybe the leak may only be avoided if you removeEvents before deleting
[jQuery] quick AJAX question
Hi all, I am using the AJAX functionality of jQuery, and would like to know how to submit a number of parameters at once, with the list of parameters being in a variable created earlier in the script. Here is a sample of the actual call: url = "/path/to/php/page/"; $("#divID").load(url,{ id: oId, title: oTitle, unit: oUnit }, function(){ //do page update etc }) Instead of declaring id, title, unit parameters, how can I generate a variable that contains these?
[jQuery] using each item's id for wrap()
i'm currently playing around with jquery for the first serious project but my initial explorations are already causing me some headaches... i'm trying to put a wrapper div around each div that matches my $.. for which i want to use the actual id of the div i'm wrapping. example: a div with id="example" should get a wrapper div with id="example- wrapper". the lousy code i've written so far is something like this... not much, really. $(document).ready(function(){ scrollers = $('div.scroller');
[jQuery] Memory leaks forever
Mike, so the goal of $.closure is to put all event handlers in the window object so that they will be properly cleaned up when the page is unloaded? It seems like that wouldn't help the leaks with elements removed while the page is running, unless empty() and the others also remove events. I have to admit, this stuff about leaks is seriously confusing me. There seems to be a lot of bad or ambiguous information about the IE memory leak problem. Doug Crockford says that Microsoft's document generally
[jQuery] Future of jQuery
Well, my 2 cents:
[jQuery] Memory leaks forever
> From: Dave Methvin
[jQuery] Memory leaks forever
I'm not sure what is causing this leak, unless all this code were nested inside another function, in which case it would be the closure circular reference leak. I would be curious to know if my $.closure patch fixes it. Would you want to try it and let me know? I've been meaning to post something about this, but in the meantime here is the code: http://mg.to/jquery-code/closure.js It's not a .patch file, just edit the code into a test copy of jQuery. You'll need to add the $.closure() function itself,
[jQuery] Future of jQuery
--- Dave Methvin <dave.methvin.at.gmail.com@jquery.at.vikas.mailshell.com>
[jQuery] Future of jQuery
--- Audun Wilhelmsen <skyfex.at.gmail.com@jquery.at.vikas.mailshell.com>
[jQuery] Memory leaks forever
> From: Michael Geary
[jQuery] Memory leaks forever
Hi, I'm working on an interface which builds lists with data retrieved by XHR. Every item of the list has got several functions bounded to click event. And it seems that a lot of memory leaks, with IE, of course. Basically, here is the structure of the code: var myList = {}; myList.build = function(id) { ... var myVars = []; for (var i in items) { $('#content').append( myVars[i] = $.DIV(...) ... } ... for (var i in myVars) $(myVars[i]).bind('click',
[jQuery] Memory leaks forever
> it doesn't seem like it would help Franck's > code as he's not removing any elements It looked like Franck had only showed a part of his code so I thought there must have been some places where he was removing elements. If not then the leak would be occurring when the user reloads or navigates away from the page. > should some sort of auto-clean-up be run > when the page is unloaded, for IE? Seems like that's the only way to solve the leaks according to Doug's page. > I do keep a reference to all
[jQuery] Future of jQuery
I just ran across jQuery a little while ago and have been lurking on this list. jQuery is a very very nice piece of work. Very concise, very powerful. But, at the end of the day, it doesn't really *do* anything. It just provides the tools to access DOM nodes and do some basic effects with them like set styles, slide up/down effects, that's about it. Everything else is left to the developer to actually build something useful using jQuery. Looking at some of the more full-featured libraries out there
[jQuery] Memory leaks forever
> Is it because of the code structure? Because I'm
[jQuery] isNot bug
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> <font size="-1"><font face="Trebuchet MS">I think I spotted a bug in the latest jquery.js source at the isNot method: </font></font> <pre>isNot: function(t) { return !this.s(t); }</pre> <small>It should be somewhat like:</small> <pre>isNot: function(t) { return !this.<b>is</b>(t); }</pre>
[jQuery] Binding events
Hey Franck,
[jQuery] thank you
Hi John, I am simply taking an opportunity to say "thank you". I have been using jQuery for the past fortnight in the development of a new application of which jQuery is an integral part. All my JS is dependant on jQuery, and I believe jQuery has simplified my coding no end. It has also reduced the amount of scripting required by at least two-thirds. I have also subscribed to your mailing list and I must also compliment you on your support. So ... thanks, you deserve a pat on the back! :-) Sincerely,
[jQuery] DOM elements or HTML
Hi all, I made an extensive use of append, prepend or before methods and of the jquery-dom library of Michael Geary (http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype). But, according to PPK (http://www.quirksmode.org/index.html?/dom/innerhtml.html), it seemed that it would be faster if I used innerHTML instead. So I rewrote Michael's libray to return HTML (with the last method of PPK) instead of DOM elements but I'm not sure if it's a good choice: it works right but I haven't any
[jQuery] Determining modifiers on a click event
Hello! I'm a total jQuery noob. I've browsed the docs and went trough the tutorial. When trapping click events, I need to determine wether the event is question was a "click" or a "shift-click". I'm not sure how to accomplish this within jQuery. Usually, I can look at event.shiftKey, but I can't seem to figure out how to get at the event object. Here's the code (almost straight from the tutorial) I'm starting with: ------------------------------------------------- $(document).ready(function(){ $("a").click(function(){
[jQuery] Binding events
Hi, Playing with jquery and jquery-dom, I modified the latter to handle events in params: In the attrs loop of _createNode: e[a] = attrs[attr]; becomes: if (attrs[attr].constructor == Function) { addEvent(e, a, attrs[attr]); } else { e[a] = attrs[attr]; } With this modification, I can create nodes like that: for (var i=0; i<items.length; ++i) { var item=items[i]; $('#x').append( $.DIV( {'id':'_'+i, 'click':myFunc}, 'item
[jQuery] jQuery and Scriptaculous: A different solution
Scriptaculous is a very nice library. But I wish to use it with jQuery, and in a "jQuery fashion". Here's what I suggest: 1: Rename the $() function in scripaculous (I renamed it to S()), as we will only use jQuery $() outside. 2: Wrap scripaculous functionality in jQuery methods. 3: Perhaps strip out some duplicate functionality. I would perhaps strip out AJAX from prototype, and reimplement jQuery effects with scriptaculous. Here's an example: http://bytetastic.com/bytecore2/jquery/test.htm ----------------------------------------
Next Page