[jQuery] Re: dev tip: combining JS script files
When you load the script, has nothing to do with the dom. The script can modify/alter the dom but the loading sequence is a completely new story. If you use the jQuery ready() method, your script will be processed right after the dom is loaded and before the images are loaded, which is what you want if you want to alter the dom, but don't care about images being shown when you do it. The scripts you want to put in after the body is script that are not run before the user interacts. That does not include behaviors, because you want them to work as soon the user e.g. clicks an element (and he/she can do that as soon as the page render). IMHO you're better of gzipping your files (and of course minimize them) and don't put more library (i.e. scripts) than you need. On 7/17/07, Michael Geary [EMAIL PROTECTED] wrote: 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: Using slideToggle with multiple divs
dan schrieb: Hello, I wish to use slidetoggle with multiple divs. I have implemented it using only one div however I want all of the divs to operate independently. You have trouble with CLASS and ID, try this: $(document).ready(function() { $('#commentbox').hide(); $('a#comment-toggle').click(function() { $('#commentbox').slideToggle(slow); alert($('#commentbox')); return false; }); }); div class=story div class=storytitle hello /div div class=storybg blah blah blah /div div class=storybottom a href=# id=comment-toggle name=comment-togglecomment/a /div div id=commentbox comment form /div /div Is better to use ID, is faster. You have not more as one comment form pro page ;) -- Viele Grüße, Olaf --- [EMAIL PROTECTED] http://olaf-bosch.de www.akitafreund.de ---
[jQuery] Re: Animate bug under IE6?
Dan G. Switzer, II wrote: Collin, Hey all -- I'm new to the list (but not so new to jQuery), and was hoping I could get some assistance regarding what appears to be a bug in the .animate function when running under IE6. Inside a .click function assigned to a specific anchor tag, I call .animate using jQuery 1.1.3.1. It works in Firefox and Safari, but IE6 reports a runtime error. When I switch to jQuery 1.1.2, it works (mostly). The first animate sequence doesn't slide, but merely re-draws when the final frame is done, but all subsequent animations work fine. Perhaps this is due to my standalone IE6 (from evolt), as I've seen it have other weird problems with JS, too. I'm running IE7 installed, unfortunately. Any suggestions would be greatly appreciated! I've posted a demo of the issue at the following location (sans a few images): http://www.command-tab.com/jquery/animate_bug/ What happens if you change the doctype from strict to transitional? My experience with using a strict XHTML declaration almost always causes me trouble in IE6. -Dan It does not necessarily have some to do with Strict or Transitional if IE runs in Quirks Mode or in Standards Mode, especially if the Doctype is XHTML. It depends on how the Doctype declaration looks like (does it have a system identifier or not?) More information: http://hsivonen.iki.fi/doctype/ By the way, in the demo an HTML Doctype is used but tags are closed as in XHTML: meta name=language content=en / ^ --Klaus
[jQuery] Re: Dynamically set function settings?
From: juliandormon Is it possible to write javascript dynamically so new functions are created with the new parameters once the user makes a change? These functions need to be added to the head of my page because they get called after other functions. In other words, the new functions interact with the javascript that's already on the page. I guess they could be written elsewhere dynamically within a main function and I simply call this remote function and thereby any sub functions that have been written to it. Is this possible? JavaScript is a dynamic language. A *very* dynamic language. You can do anything, any time. JavaScript functions do not reside in the head nor the body of the document. All global functions are actually properties of the window object. Where or when you define them has no effect on that. Consider this piece of code: myfunction = function() { alert( 'hi!' ); }; You could execute that code in a script tag in the head, in a script tag in the body, in a script that you load dynamically, or in a script that you *create on the fly*. It will do the same thing regardless. How about this one: eval( myfunction = function() { alert( 'hi!' ); }; ); That does exactly the same thing, but now you're using a string that you could have generated any way you like. If there is other code in the page that calls myfunction(), and you later redefine myfunction, that existing code will start using your new function. One exception: Suppose a piece of code does this, or something like it: var savemyfunction = myfunction; And then that code calls savemyfunction(). Code like that will not pick up your new function definition, because it has already saved a reference to the previous myfunction. I didn't look at your specific question about innerFade, I'm just addressing the general question of defining functions dynamically. -Mike
[jQuery] Re: dev tip: combining JS script files
Well i have to think about that, but i might do some releasing of code. The advantage i have, is that it runs on my own servers, so i get to choose the owner ;) On 21 jul, 09:14, Jon Ege Ronnenberg [EMAIL PROTECTED] wrote: When you load the script, has nothing to do with the dom. The script can modify/alter the dom but the loading sequence is a completely new story. If you use the jQuery ready() method, your script will be processed right after the dom is loaded and before the images are loaded, which is what you want if you want to alter the dom, but don't care about images being shown when you do it. The scripts you want to put in after the body is script that are not run before the user interacts. That does not include behaviors, because you want them to work as soon the user e.g. clicks an element (and he/she can do that as soon as the page render). IMHO you're better of gzipping your files (and of course minimize them) and don't put more library (i.e. scripts) than you need. On 7/17/07, Michael Geary [EMAIL PROTECTED] wrote: 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: Server Time of the day Clock functions
Thanks Andy... I thought after the post that I should of added it would be something similar to using Kelvin's StyleSwitcher to load the CSS page styles, but only load those according to the server clock. The page background or header background even may be the only thing that needs to change, and that usually loads last anyways. Just some ideas, but can Jquery retrieve the server time, or could it only get the client/browser time? On Jul 20, 4:18 pm, Andy Matthews [EMAIL PROTECTED] wrote: That would probably be best done on the server side. When the page loads, check the time and provide an alternate CSS file. Unless of course you'd like the page to change after it has already loaded. Then yes, jQuery could be used to do that. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Friday, July 20, 2007 4:04 PM To: jQuery (English) Subject: [jQuery] Server Time of the day Clock functions Can jquery be used to load a different site design (skin if you like) according to the hosting server clock time. The inspiration for the idea is:http://www.taprootcreative.com/ Which loads different site backgrounds and background sounds. Not quite sure how they have their version working. Too see both versions whether than waiting until the time changes via the Tallahassee, Florida server clock, check here:http://web.archive.org/web/*/www.taprootcreative.com Click on anything after Feb 27, 2007 both versions are archived. Of course I always think jquery can do about anything, this is a sort of time travel right... ;)
[jQuery] IE 7/6 frozen with massive use of jquery plugins
I have intermittent error, basically IE is frozen. I can not reproduce seems that I doesn't follow a pattern. I have developed an application with asp and I use a lot of jquery in order to do Ajax call to load scripts and pages. The structure of the application is: I have a main page with two divs: a) Menu div. b) Content div. When I load the main page I load all the java files that I will need using ajax. I use a lot of plugins superfish, validation, form, IFrame, block...etc. When user chose a menu option: - Block the page with waiting message. - Clean content div (using empty method). - Call using ajax to the option page (ex: newCustomer). o In the success: I assign the data of the result of the ajax call to the content div. o If the loaded page has some dynamics divs then I use again an ajax call to load that dynamic links. I don't know why the system froze. Maybe is because I load all the javascript in the main window and it is too much? Maybe javascript has any expiration? Maybe is because I jquery can not control all the events (remember that I only load jquery one time) and I use a lot of forms with validations (plugin validation) and ajax calls? Could be related with the cpu? My pc is quite powerful , and It seems (seems...) that happens more often with I less powerful pcs... I am I little bit desperate because I don't' know who begin to investigate the problem. Any help?
[jQuery] DNN and jQuery Conflict
I've recently been brought into a DNN project where I'm trying to enlighten my co-woker(s) with the goodness which is jQuery. I'm having a problem getting the two to play nicely, together, though. I've tested both DNN and the jQuery code separately, and they work like a champ. I can also get them both to work successfully together in an individual module, but any other module that I call the jQuery from will fail with an Object expected; to be expected since it can't reach that script including. So, my next thought was to use Page Header Tags to include the jQuery script(s) at the top of the page before any of the modules even have a chance to try and grab custody. However, it appears to only crash the entire DNN Page with an Operation aborted message with no other details. Any information I can relay to help figure this out, I will. Sadly, do to the classification of the network I'm working on, I'm unable to copy the code over. If it would be helpful for me to make a mock-up of my work, to display here, let me know. Thanks, in advance, for any and all help! James McCabe james [dot] mccabe [at] lostwhispers [dot] com
[jQuery] Re: DNN and jQuery Conflict
Hmm, I left off a small portion that might help figure this one out. When I place the remote script include text (script src=some/where/ else/jquery.js/script) in the Page Header Tags, I can use basic jQuery across the modules. However, the problem comes when I try and add more than one jQuery script (plugins, etc.). Like I said, I have no problem when I put the jQuery and the plugin script in the same module, but once I try and make them cross-module by putting them in the header or just putting the extra remote script call in the desired module, I get the Operation Aborted failure. Sorry for forgetting to include this in the original message. It has been a long night at the office. Thanks, again! James McCabe james [dot] mccabe [at] lostwhispers [dot] com
[jQuery] Re: DNN and jQuery Conflict
Hi James, Did you check that it is not a namespace issue? Also, which plugins do you intend to use? Not all jquery plugins were created equals in quality... Alex -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of James Sent: samedi 21 juillet 2007 11:05 To: jQuery (English) Subject: [jQuery] Re: DNN and jQuery Conflict Hmm, I left off a small portion that might help figure this one out. When I place the remote script include text (script src=some/where/ else/jquery.js/script) in the Page Header Tags, I can use basic jQuery across the modules. However, the problem comes when I try and add more than one jQuery script (plugins, etc.). Like I said, I have no problem when I put the jQuery and the plugin script in the same module, but once I try and make them cross-module by putting them in the header or just putting the extra remote script call in the desired module, I get the Operation Aborted failure. Sorry for forgetting to include this in the original message. It has been a long night at the office. Thanks, again! James McCabe james [dot] mccabe [at] lostwhispers [dot] com Ce message Envoi est certifié sans virus connu. Analyse effectuée par AVG. Version: 7.5.476 / Base de données virus: 269.10.11/909 - Date: 20/07/2007 16:39
[jQuery] Re: DNN and jQuery Conflict
Alex, In this case, the only plugin I'm attempting to include is the Jorn Zaefferer's Tooltip plugin; of course, in addition to the actual jQuery (1.1.3.1) script itself. On Jul 21, 5:03 am, Alexandre Plennevaux [EMAIL PROTECTED] wrote: Hi James, Did you check that it is not a namespace issue? Also, which plugins do you intend to use? Not all jquery plugins were created equals in quality... Alex
[jQuery] Re: DNN and jQuery Conflict
Mm i never had issues with dnn and js I just add my script in the default.aspx page myself that works most of the time also the page header tags option is not very usuable, you cannot add to many scripts more than a few lines and it gets saved truncated so you have missng code and none closed tags I do the call for the scripts ( plugins and jquery ) in the main default.aspx ( make sure to do it as http://www.mydnnportal.com/js/jquery.js( dont use /js/jquery.js ) - if youa re deep in a friendly url like http://www.mydnnportal.com/tabid/87/myproperty/myvalue/default.aspx it cannot find the js file because there is no http://www.mydnnportal.com/tabid/87/myproperty/myvalue/js as for the direct calls to actually call plugin with the desired parameters the can be inserted in he top of your skin ascx files % ascx script script here /script I also use the snapsis dnn css module with template possibility's together with dnn. So if I use that he has a specal option that allow you to put all scripts ins special tags and than the skinobject itself takes care of the register.clientsidescript for you to make sure it gets injected in the head I have been using it in over 100 portals so far an never an issue ps: for the pure jquery people, im answering this mail with tems of jquery asp.net and dotnetnuke Armand aka Nokiko on dnn forum On 7/21/07, James [EMAIL PROTECTED] wrote: Alex, In this case, the only plugin I'm attempting to include is the Jorn Zaefferer's Tooltip plugin; of course, in addition to the actual jQuery (1.1.3.1) script itself. On Jul 21, 5:03 am, Alexandre Plennevaux [EMAIL PROTECTED] wrote: Hi James, Did you check that it is not a namespace issue? Also, which plugins do you intend to use? Not all jquery plugins were created equals in quality... Alex -- Armand Datema CTO SchwingSoft
[jQuery] Re: Should be real easy but not for me
Hi Mitch, I'm afraid it is a silly one! function advmode() ( $(#Panel).SlideInRight(1000); }; You've used a parenthesis ( instead of brace { for opening the function body. Change that and it works as expected :-) Glen, SlideInRight and similar functions are from Interface elements for jQuery. --rob On 7/20/07, Glen Lipka [EMAIL PROTECTED] wrote: Im a little confused. SlideInRight and SlideOutRight arent jQuery functions. Are these from a plugin you made? Best thing is to post a simple proof-of-concept page. then we can help you debug it. Glen On 7/19/07, Goofy [EMAIL PROTECTED] wrote: Why wont this work. Its so simple. I just want to call a fuction using the onclick event. I want it to move a div called Panel. I set up the function function advmode() ( $(#Panel).SlideInRight(1000); }; Then inside a table cell with an image for a button I have this simple link a href=#Javascript; onclick=advmode()img src=images/Advanced Search Button Wide_No.png width=250 height=25 / I must be missing something really basic because this does not come close to working. But this does\ a href=#Javascript; id=PanelButtonOpen2img src=images/ Advanced Search Button Wide.png width=250 height=25 / $('#PanelButtonOpen2').click(function() { $(#Panel).SlideOutRight(1000); }); Thanks for any aid I am feeling very silly tonight. Mitch -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] Re: DNN and jQuery Conflict
Thank you, Armand, for your swift response. I will look into these recommendations and see what I can't make work. On Jul 21, 4:43 am, Armand Datema [EMAIL PROTECTED] wrote: Mm i never had issues with dnn and js I just add my script in the default.aspx page myself that works most of the time also the page header tags option is not very usuable, you cannot add to many scripts more than a few lines and it gets saved truncated so you have missng code and none closed tags I do the call for the scripts ( plugins and jquery ) in the main default.aspx ( make sure to do it as http://www.mydnnportal.com/js/jquery.js ( dont use /js/jquery.js ) - if youa re deep in a friendly url like http://www.mydnnportal.com/tabid/87/myproperty/myvalue/default.aspx it cannot find the js file because there is nohttp://www.mydnnportal.com/tabid/87/myproperty/myvalue/js as for the direct calls to actually call plugin with the desired parameters the can be inserted in he top of your skin ascx files % ascx script script here /script I also use the snapsis dnn css module with template possibility's together with dnn. So if I use that he has a specal option that allow you to put all scripts ins special tags and than the skinobject itself takes care of the register.clientsidescript for you to make sure it gets injected in the head I have been using it in over 100 portals so far an never an issue ps: for the pure jquery people, im answering this mail with tems of jquery asp.net and dotnetnuke Armand aka Nokiko on dnn forum On 7/21/07, James [EMAIL PROTECTED] wrote: Alex, In this case, the only plugin I'm attempting to include is the Jorn Zaefferer's Tooltip plugin; of course, in addition to the actual jQuery (1.1.3.1) script itself. On Jul 21, 5:03 am, Alexandre Plennevaux [EMAIL PROTECTED] wrote: Hi James, Did you check that it is not a namespace issue? Also, which plugins do you intend to use? Not all jquery plugins were created equals in quality... Alex -- Armand Datema CTO SchwingSoft
[jQuery] Re: DNN and jQuery Conflict
A good testing way is also to go the the dnn page and save the file as html ( html only ) then copy over that html file to your dnn root and add the jquery scripts and calls. If you can get the desired effects there then its a dnn issue and those can be truncated header tag strings cant find js files ( use the full http://mydnn.com/js/jquery.js ) garbage html output ( dont expect jquery to work when admin or host are logged in ) - this is because of the extra script and html injection Armand On 7/21/07, Armand Datema [EMAIL PROTECTED] wrote: Mm i never had issues with dnn and js I just add my script in the default.aspx page myself that works most of the time also the page header tags option is not very usuable, you cannot add to many scripts more than a few lines and it gets saved truncated so you have missng code and none closed tags I do the call for the scripts ( plugins and jquery ) in the main default.aspx ( make sure to do it as http://www.mydnnportal.com/js/jquery.js( dont use /js/jquery.js ) - if youa re deep in a friendly url like http://www.mydnnportal.com/tabid/87/myproperty/myvalue/default.aspx it cannot find the js file because there is no http://www.mydnnportal.com/tabid/87/myproperty/myvalue/js as for the direct calls to actually call plugin with the desired parameters the can be inserted in he top of your skin ascx files % ascx script script here /script I also use the snapsis dnn css module with template possibility's together with dnn. So if I use that he has a specal option that allow you to put all scripts ins special tags and than the skinobject itself takes care of the register.clientsidescript for you to make sure it gets injected in the head I have been using it in over 100 portals so far an never an issue ps: for the pure jquery people, im answering this mail with tems of jquery asp.net and dotnetnuke Armand aka Nokiko on dnn forum On 7/21/07, James [EMAIL PROTECTED] wrote: Alex, In this case, the only plugin I'm attempting to include is the Jorn Zaefferer's Tooltip plugin; of course, in addition to the actual jQuery (1.1.3.1) script itself. On Jul 21, 5:03 am, Alexandre Plennevaux [EMAIL PROTECTED] wrote: Hi James, Did you check that it is not a namespace issue? Also, which plugins do you intend to use? Not all jquery plugins were created equals in quality... Alex -- Armand Datema CTO SchwingSoft -- Armand Datema CTO SchwingSoft
[jQuery] Re: Loading Javascript Dynamically (in other words, as needed)
Try this: if (typeof myFunction === undefined) { $.getScript(myFunction.js, function() { alert('script loaded'); }); } --rob On 7/20/07, Chrisss [EMAIL PROTECTED] wrote: Hello, I was wondering if jQuery can be used to load javascript dynamically, on an as-needed basis. Here is the problem I have: I want to load a page with as little javascript as possible. When someone clicks on an item that requires some javascript functionality, I want it to load a javascript function from an external file and then execute it. While there is some simple javascript I've found that can do this kind of thing by appending the script to the DOM, it can't do things in order. For instance, I want to load the function, and then execute it. To do so, the javascript has to have some way to check if the funciton exists. I don't like the idea of doing a time-out loop, so I was wondering if jQuery has something built in for this kind of thing. Thank you! Chris -- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 There's a whale there's a whale there's a whale fish he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.
[jQuery] Re: New Plugin: HoverAccordion
Cool, this could be very useful! I've noticed Apple's menu that behaves this way lately, glad to see someone implement it, and it appears to be a good usable implementation. Eric On Jun 26, 7:34 am, Bernd Matzner [EMAIL PROTECTED] wrote: Hello, I'm really excited: My first try at building a jQuery plugin! This is another accordion, but in this case, it's designed to open up by just moving your mouse over an item, just like on thehttp://www.apple.com/mac/ website. Can be used together with the excellent hoverIntent plugin to avoid accidentally opening an item. See http://berndmatzner.de/jquery/hoveraccordion/ for instructions and examples. Looking forward to your comments, Bernd
[jQuery] Re: Error in IE 5.5 / jQuery 1.1.3.1 - 'nodeName' is Null
The error seems when assigning an event to a class: $('.myclass).click(function() {return false;}); - error (only) in IE5.5 / jQuery 1.1.3.1 // works with IE7 etc $('#myid).click(function() {return false;}); - works with IE5.5 / jQuery 1.1.3.1 myclass and myid in html: li # s1.gif Kleine Schriften /li best regards Bernd -- View this message in context: http://www.nabble.com/Error-in-IE-5.5---jQuery-1.1.3.1%27nodeName%27-is-Null-tf4115982s15494.html#a11721947 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: IE 7/6 frozen with massive use of jquery plugins
I m no specialist of such issue but you could first check if its memory related. Just browse your website and see if the memory is continuously rising.(In the task-manager) oscar esp wrote: I have intermittent error, basically IE is frozen. I can not reproduce seems that I doesn't follow a pattern. I have developed an application with asp and I use a lot of jquery in order to do Ajax call to load scripts and pages. The structure of the application is: I have a main page with two divs: a) Menu div. b) Content div. When I load the main page I load all the java files that I will need using ajax. I use a lot of plugins superfish, validation, form, IFrame, block...etc. When user chose a menu option: - Block the page with waiting message. - Clean content div (using empty method). - Call using ajax to the option page (ex: newCustomer). o In the success: I assign the data of the result of the ajax call to the content div. o If the loaded page has some dynamics divs then I use again an ajax call to load that dynamic links. I don't know why the system froze. Maybe is because I load all the javascript in the main window and it is too much? Maybe javascript has any expiration? Maybe is because I jquery can not control all the events (remember that I only load jquery one time) and I use a lot of forms with validations (plugin validation) and ajax calls? Could be related with the cpu? My pc is quite powerful , and It seems (seems...) that happens more often with I less powerful pcs... I am I little bit desperate because I don't' know who begin to investigate the problem. Any help?
[jQuery] Re: Error in IE 5.5 / jQuery 1.1.3.1 - 'nodeName' is Null
I changed $('.myclass).click(function() {return false;}); to $('a.myclass).click(function() {return false;}); now it works Thanks Bernd bjb wrote: The error seems when assigning an event to a class: $('.myclass).click(function() {return false;}); - error (only) in IE5.5 / jQuery 1.1.3.1 // works with IE7 etc $('#myid).click(function() {return false;}); - works with IE5.5 / jQuery 1.1.3.1 myclass and myid in html: li # s1.gif Kleine Schriften /li best regards Bernd -- View this message in context: http://www.nabble.com/Error-in-IE-5.5---jQuery-1.1.3.1%27nodeName%27-is-Null-tf4115982s15494.html#a11722133 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] How to get a ref to the event handler registered via the bind() function?
In short, it seems that the event handler function registered via the bind() method is not available through the element's onXXX attributes. For example: $('#myEle').bind('click', function(){ // do something }); but the myEle.onclick attribute is still undefined after the above bind() call. The handler is registered into the $events hash, I believe, but I couldn't figure out how to get the reference to it. Can anyone help me out? Thanks!
[jQuery] ie6pnghack plugin weirdness
Hi guys, I have a weird situation (1) uzhana.com - uses ie6pnghack plugin http://khurshid.com/jquery/iepnghack/ (2) sensorynetworks.com - uses same methodology without implementing jquery (1) always waits till all images are fully loaded before showing the actual page (2) starts loading the page immediately and then apply png hack Problem is using (1) getting really annoying, 'cause page doesn't show anything till all images are fully loaded (especially painful for people on dial-up) Sharing your thoughts would be appreciated Thanks heaps, --Kush mann
[jQuery] Re: Loading Javascript Dynamically (in other words, as needed)
Hi, Chrisss, Maybe $.getScript is what you looking for. say, there is a hello.js with content: alert(hello); when you invoke $.getScript(hello.js) , scripts in hello.js will be eval and execute. for more details about $.getScript you can checkout the api doc On Jul 21, 12:57 am, Chrisss [EMAIL PROTECTED] wrote: Hello, I was wondering if jQuery can be used to load javascript dynamically, on an as-needed basis. Here is the problem I have: I want to load a page with as little javascript as possible. When someone clicks on an item that requires some javascript functionality, I want it to load a javascript function from an external file and then execute it. While there is some simple javascript I've found that can do this kind of thing by appending the script to the DOM, it can't do things in order. For instance, I want to load the function, and then execute it. To do so, the javascript has to have some way to check if the funciton exists. I don't like the idea of doing a time-out loop, so I was wondering if jQuery has something built in for this kind of thing. Thank you! Chris
[jQuery] ie6pnghack plugin weirdness
Hi guys, I have a weird situation (1) uzhana.com - uses ie6pnghack plugin http://khurshid.com/jquery/iepnghack/ (2) sensorynetworks.com - uses same methodology without implementing jquery (1) always waits till all images are fully loaded before showing the actual page (2) starts loading the page immediately and then apply png hack Problem is using (1) getting really annoying, 'cause page doesn't show anything till all images are fully loaded (especially painful for people on dial-up) Sharing your thoughts would be appreciated Thanks heaps, --Kush mann
[jQuery] Re: jQuery jEditable
Right thanks... ...I though I'd ask here anyway, just in case anyone could help.
[jQuery] load record and show form, two responses from clicking one link
Hi- I have to thank you all for things like 15 days of jquery and the sites with the tutorials, I've been able to add some great things to my pages lately. Apologies if this question is stupid. I have a form. There's a table on the page that displays the records. Each record has an edit button. Hit the edit button, the record gets loaded and the form is displayed - in Firefox 2.0+, not in earlier versions or any versions of Internet Explorer. Here's the code: script type=text/javascript; $('a#slick-show').click(function() { $('div#the_form').show('slow'); }); /script a href='admin.php?id={$row['id']}action=edit' class='bold' id='slick-show'edit/a I've been looking at bind? I tried: $('a#slick-show').bind(click, function() { $('div#the_form').show('slow') ); }); but no luck - it breaks it in Firefox and I get an error message missing ; before statement Any thoughts very much appreciated. Take care. Hugh
[jQuery] Re: Click to call a fuction?
I'm going to build a page with just the basic code for responding to the click then add the libraries and see if that makes things fail. I'll post a message about. My comments are below and I appreciate your taking the time to explain this to me. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Scott Sauyet Sent: Friday, July 20, 2007 1:07 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Click to call a fuction? Mitchell Waite wrote: How generous of you to go into this detail and give me so many options. Sadly I tried all of these techniques and none of them worked. Could you post a sample page somewhere where these fail? This is pretty basic JQuery. I'm wondering if there is some interference with another library. Have you looked at them in Firebug? One more possibility: Is your code inside a $(document).ready() block? If not, and if it's running in the head of the document, then JQuery doesn't have any DOM elements to work with. script type=text/javascript src=/path/to/jquery.js/script script type=text/javascript $(document).ready(function() { alert(DOM loaded. JQuery will now work); // put your code here } /script I need to read more about selectors. It may also be my project has too many bells and whistles that it's not a true test of your ideas. Only if one of those bells is not working well with JQuery. It happens, especially if other code is using the $() function. - Essentially, you need some way with CSS (or possibly XPath) selectors to distinguish the elements that need your new behavior. Create a selector for those elements and create a JQuery object from them using the $() function. Then it's easy to send a behavior to the click method of this JQuery object. -- I have read this 10 times and I am still not sure what you are saying. Concise, elegant, and completely unreadable, huh? My wife says that all the time! :-) And I bet she is a great at getting to explain it to mere mortals. One more try: You have a number of elements to which you want to attach certain behavior. The core of JQuery has to do with how you select those elements. JQuery will accept a description of the set of elements you want (a selector) and walk through the document object model (DOM) creating a single object that wraps up all matching elements. This concept of walking is something that I am not familiar with. In fact I have to say that I am not well versed in the DOM and I think that is lowering my ability to get the big picture, so that is part of my work ahead. I certainly get the essence of your point, which is the ability to take a collection of css and HTML and manipulate it as a single element with JQuery and all its tools. Is there a place I can learn all about the DOM that is not super technical? This lets you work with these elements in many ways as though they were a single element. When you run this: $(#myDiv img.myClass).click(someFunction) what you are doing is creating a CSS-based selector, #myDiv img.myClass, which can be thought of as all the images whose classes include 'myClass' and are contained in the element with the id 'myDiv'. So you mean: if you have something like an HTML table with 6 img src=href.. statements in it, and you give each of these a class=myClase then every one of those images will be considered by jQuery to be the ID of their main container DIV, which is #myDiv here. So you are able to perform some cool manipulation of all those imgs. Is that close? You are wrapping those in a single JQuery object by calling the $() function with that selector. Then, you are calling the method click on that object, passing in the function as a parameter. Behind the scenes, JQuery is binding that function to the click event of each matching element. I think I get this. The variety and the brevity of selectors you can apply is one of the hallmarks of JQuery. But for your purposes, simple selectors, such as img.myClass would probably be enough. Does that make any more sense? Or am I just confusing the issue? It helps a TON Scott. I read the Selectors docs. Pretty useless to me. The entire subject is confused by the inclusion of xpath and no real world example. I could not make any thing of its contents. -- Scott
[jQuery] Re: jQuery for Dummies
Thanks for the clarification Karl, I think I see the audience your book is intended for. I am not a true programmer in the sense I do it every day, so while I have coauthored and published lots of language books I do not consider myself very high above dummy status. BTW I love your blog at http://www.learningjquery.com/ Lots of cool stuff. Mitch From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Karl Swedberg Sent: Thursday, July 19, 2007 10:33 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery for Dummies Hi Mitch, While we don't get into the history of JavaScript/ECMAScript or explain what a CSS class is, for example, I can assure you that the book doesn't assume a whole lot of knowledge. The first chapter deals with some really, really basic stuff, like: - what jQuery does - why jQuery works well - how to download the jquery.js file - how and where to include jquery.js and your custom script file in the head of your HTML document - how to add a class to an element on page load You'll also see elementary tips like this: After the stylesheet is referenced, the JavaScript files are included. It is important that the script tag for the jQuery library be placed before the tag for our custom scripts; otherwise, the jQuery framework will not be available when our code attempts to reference it. So, there may not be much fluff, but we tried really hard to explain even the simplest of concepts so that people making a shift from design to development or from some other programming language to JavaScript would feel comfortable. Besides, from what I see on your web site, you are very far from being a dummy. If you have any questions along the way, I'd be happy to try to answer them, as I'm sure would many others on this list. Welcome! --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 19, 2007, at 3:28 PM, Mitchell Waite wrote: Thanks to everyone for recommending the book, I ordered it right away. However, I get the impression from this comment in the five minute review this is not a for Dummies book Glancing at the Table of Contents - I'm happy to note there are no basic introductory 'HTML/Javascript' chapters (no fluff!) you dive right into a simple jQuery script where you manipulate some CSS. I was hoping there would be a basic intro to the things most people familiar with JavaScript take for granted. So Initially you start at the basics - jQuery syntax, selectors, events and using effects. I would like to see several pages of different ways to activate a jQuery, as I have seen at least a dozen,. For example as dumb as this sounds it took me a while to figure out you can call anything in jQuery, using a onclick=foo(). But I have not been able to get several jQuery functions to work this way either. I am not familiar with all the events like attaching and focus and things like chaining are new to me. Again, I'm talking a real dummy here :) Though I am proud of what I have been able to do: http://www.whatbird.com/wwwroot/NEW_TAB_SEARCH.html Check the effects on the Text and Small Icon views and click the Sorting-First, Last to see it puff. The big challenge in this simulation was getting the effects to wait a fixed time before firing, so as to simulate a real trip to the server. Mitch -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent: Thursday, July 19, 2007 11:28 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: jQuery for Dummies Hi Mitchell, Welcome to jQuery my man. Here's a great option for you. jQuery team member Karl Swedberg and Jonathan Chaffer have authored a book called Learning jQuery : Better Interaction Design and Web Development with Simple JavaScript Techniques You can find it here: http://www.packtpub.com/jQuery/book/mid/100407j4kh3d I would highly recommend you pick it up and in addition, jump over to the following sites: learningjquery.com http://15daysofjquery.com/ They were invaluable to me during my initial road to understanding the library. I hope this helps. Rey Mitchell Waite wrote: I'm trying to learn jQuery from the tutorials at the web site. They are very good but assume a pretty good knowledge of javascript and calling and using functions in ways that bewilder me. Is there any kind of Idiot's Guide to using jQuery? If not does anyone want to co-author one with me? Mitch Waite http://www.mitchwaite.com http://www.whatbird.com -- BrightLight Development, LLC. 954-775- (o) 954-600-2726 (c) [EMAIL PROTECTED] http://www.iambright.com
[jQuery] [Interface] ScrollTo
Hi, I am using the ScrollTo function of interface but I can notice that it is not very fluid scrolling... I use it to scroll my header on all the pages except the main page. So I have put it in the jQuery(document).ready function, so that when the user clicks on the page, it automatically scroll header and go on content. If anyone has any tips to improve the scrolling, let me know! Thank you ! -- View this message in context: http://www.nabble.com/-Interface--ScrollTo-tf4122985s15494.html#a11725473 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: Autocomplete.js not runs on PHP Version 5.0.2
On Jul 21, 3:26 pm, navi [EMAIL PROTECTED] wrote: Hello All, I found that autocomplete runs only on PHP 5.2 and higher version, Any solution in this regard. Unfortunately, the author of autocomplete fails to document which PHP version it needs. The solution, i'm afraid, is to upgrade. For more information, see: http://gophp5.org/ In short: any PHP version under 5.2 won't be supported much longer by many leading PHP applications/frameworks.
[jQuery] Re: Click to call a fuction?
On Jul 21, 2007, at 3:23 PM, Mitchell Waite wrote: This concept of walking is something that I am not familiar with. In fact I have to say that I am not well versed in the DOM and I think that is lowering my ability to get the big picture, so that is part of my work ahead. I certainly get the essence of your point, which is the ability to take a collection of css and HTML and manipulate it as a single element with JQuery and all its tools. Is there a place I can learn all about the DOM that is not super technical? Hi Mitchell, Here is a little snippet from the book (Learning jQuery) that might help explain the DOM concept a bit: ++ One of the most powerful aspects of jQuery is its ability to make DOM traversal easy. The Document Object Model is a family-tree structure of sorts. HTML, as well as other markup languages, uses this model to describe the relationships of things on a page. When we refer to these relationships, we use the same terminology that we use when referring to family relationships: parents, children, and so on. A simple example can help us understand how the family tree metaphor applies to a document: html head titlethe title/title /head body div pThis is a paragraph./p pThis is another paragraph./p pThis is yet another paragraph./p /div /body /html Here, html is the ancestor of all the other elements; or, in other words, all the other elements are descendants of html. The head and body elements are children of html. Therefore, in addition to being the ancestor of head and body, html is also their parent. The p elements are children (and descendants) of div, descendants of body and html, and siblings of each other. ++ When Scott refers to walking the DOM, he's talking about accessing elements in your HTML by moving up from child to parent or down from parent to child or across from sibling to sibling. Does that make sense? --Karl _ Karl Swedberg www.englishrules.com www.learningjquery.com
[jQuery] Click to Call a Function Part 2
Its Mitch again learning about clicks and events:) I set up this test page http://www.whatbird.com/wwwroot/test.html Mouseover the nest image and it displays a message about the event. Click on the nest and fades to 50% opacity. Notice how the bottom gets clipped? I can't figure this out. Two other questions. 1. Is this the right or best way to do this? 2. Is there a way to specify the hiding of the message without having to repeat the same statement for every time you want to hide it? Thanks for helping the dummy Mitch
[jQuery] Re: Click to Call a Function Part 2
The height of the div id=nest is 208px, but the image inside it is 260px; Line 40. Make them both 260 and it should stop clipping. Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: Its Mitch again learning about clicks and events:) I set up this test page http://www.whatbird.com/wwwroot/test.html Mouseover the nest image and it displays a message about the event. Click on the nest and fades to 50% opacity. Notice how the bottom gets clipped? I can't figure this out. Two other questions. 1. Is this the right or best way to do this? 2. Is there a way to specify the hiding of the message without having to repeat the same statement for every time you want to hide it? Thanks for helping the dummy Mitch
[jQuery] Re: Click to Call a Function Part 2
I didnt quite understand what you are saying for the follow up questions. 1. best way to do what? 2. Which statement is getting repeated that you dont want to? Glen On 7/21/07, Glen Lipka [EMAIL PROTECTED] wrote: The height of the div id=nest is 208px, but the image inside it is 260px; Line 40. Make them both 260 and it should stop clipping. Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: Its Mitch again learning about clicks and events:) I set up this test page http://www.whatbird.com/wwwroot/test.html Mouseover the nest image and it displays a message about the event. Click on the nest and fades to 50% opacity. Notice how the bottom gets clipped? I can't figure this out. Two other questions. 1. Is this the right or best way to do this? 2. Is there a way to specify the hiding of the message without having to repeat the same statement for every time you want to hide it? Thanks for helping the dummy Mitch
[jQuery] Re: Click to Call a Function Part 2
Ok, sorry, Im dense today and clicking send too quickly. :( Yes, there is a better way. Ill whip up a demo. brb Glen On 7/21/07, Glen Lipka [EMAIL PROTECTED] wrote: I didnt quite understand what you are saying for the follow up questions. 1. best way to do what? 2. Which statement is getting repeated that you dont want to? Glen On 7/21/07, Glen Lipka [EMAIL PROTECTED] wrote: The height of the div id=nest is 208px, but the image inside it is 260px; Line 40. Make them both 260 and it should stop clipping. Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: Its Mitch again learning about clicks and events:) I set up this test page http://www.whatbird.com/wwwroot/test.html Mouseover the nest image and it displays a message about the event. Click on the nest and fades to 50% opacity. Notice how the bottom gets clipped? I can't figure this out. Two other questions. 1. Is this the right or best way to do this? 2. Is there a way to specify the hiding of the message without having to repeat the same statement for every time you want to hide it? Thanks for helping the dummy Mitch
[jQuery] Re: Click to Call a Function Part 2
Ok, sorry for the 4 emails. A better way: http://www.commadot.com/jquery/events/ Also, here is a way to get fancy pants with it. Uses Brandon's behavior plugin. My first use of it. http://www.commadot.com/jquery/events/append.htm Glen On 7/21/07, Glen Lipka [EMAIL PROTECTED] wrote: Ok, sorry, Im dense today and clicking send too quickly. :( Yes, there is a better way. Ill whip up a demo. brb Glen On 7/21/07, Glen Lipka [EMAIL PROTECTED] wrote: I didnt quite understand what you are saying for the follow up questions. 1. best way to do what? 2. Which statement is getting repeated that you dont want to? Glen On 7/21/07, Glen Lipka [EMAIL PROTECTED] wrote: The height of the div id=nest is 208px, but the image inside it is 260px; Line 40. Make them both 260 and it should stop clipping. Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: Its Mitch again learning about clicks and events:) I set up this test page http://www.whatbird.com/wwwroot/test.html Mouseover the nest image and it displays a message about the event. Click on the nest and fades to 50% opacity. Notice how the bottom gets clipped? I can't figure this out. Two other questions. 1. Is this the right or best way to do this? 2. Is there a way to specify the hiding of the message without having to repeat the same statement for every time you want to hide it? Thanks for helping the dummy Mitch
[jQuery] [NEWS] AjaxRain.com Continues to Grow
I've mentioned AjaxRain (http://www.ajaxrain.com/) on numerous occasions and for good reasons. They have by far, the most comprehensive collection of Ajax/DOM/JS components around and its constantly being updated. Apart from that, they're a jQuery-powered site with a developer that loves jQuery and is always posting the latest jQuery plugins on there. They're now up to 418 plugins and demos so be sure to check them out: http://www.ajaxrain.com/ Rey
[jQuery] Re: Click to Call a Function Part 2
$(this) is the anchor link the user clicked on. What is nice about jquery is the whole concept of $(this). Once you know what the user moused over or clicked on or dragged or whatever, you have a place to start in your code. For instance, let's say you had a table with ten rows. and this code: $('td').click(function(){ $(this).parents(tr).addClass(foo); }); That means you would be binding a click event to EVERY row, and use one single click function to mean, Whatever row the user clicked on...climb up to the TR and give it a new css class called Foo. It's incredibly powerful. One of my first jQuery examples used the same thing but with a mouseover instead of a click. That let me highlight the background of the row the user was one. My goodness, I was so happy to be gone with onmouseover and onmouseout of every single TR. This line: $(#console a. + type).fadeIn(1000); Basically what it means is that I want to end up with one of the following: $(#console a.click).fadeIn(1000); $(#console a.over).fadeIn(1000); $(#console a.out).fadeIn(1000); But rather than make 3 lines. I used a flexible feature of jQuery which is using variables in the middle of the statement. I ended the part in quotes after the a-dot, and then used + type. Type is just a made up word. I could have said eventType or Foo. If you notice all the lines that call this had the type in the parenthethes. showLink(over). So it's kind of like a fancy CSS rule builder using a variable. I consider it an advanced technique (FOR ME). I am not a programmer. The tutorials are a great place to start. I would do all the basic examples first. You will be surprised how much foundation they give you. Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: There is LOT going on in your excellent examples, lots for me to ponder. For the first example it appears that first you make single container called #console which you use to display what I think are links (a). Then you set its display to none so its invisible. $(document).ready(function(){ $('#nest').click(function(){ showLink(click); }); $('#nest').mouseover(function(){ showLink(over); }); $('#nest').mouseout(function(){ showLink(out); }); $('#console a').click(function(){ $(this).fadeOut(slow); }); }); Here I believe you attaching four mouse events to the #nest div, and calling the showlink function with a parameter that displays the name of the event. This so much simpler then my approach where I hide and showed DIVs that contained static messages. However my actual goal is not to display messages but to reveal more graphics but how would you have known that? So I will next post what my actual goal is in a new demo. Still I love this method. $('#console a').click(function(){ $(this).fadeOut(slow); }); I think this cool piece of code says that any link in the div #console should fadeout slowly if it receives a click. *I don't know what (this) means however.* function showLink(type) { $(#nest).fadeTo(1000, .5); $(#console a. + type).fadeIn(1000); } I think this function does a double duty which I did not know you could do. First $(#nest).fadeTo(1000, .5); fades the #nest image to 50%. However unlike my example yours fades on any mouseover, mine just did it on a click event. That's because all you events call the same routine. I would like to distinguish the Mouseover from the Click. Then I think this piece of code, which again is a lot for a beginner $(#console a. + type).fadeIn(1000); Takes any link that has been clicked and somehow comes up with a string like mouse over, but god only knows how it works. Thanks for all the emails, I'll take as many as you can deliver. I'm going to wait till I grok this before moving to the fancy smanchy one. Mitch *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Glen Lipka *Sent:* Saturday, July 21, 2007 2:43 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: Click to Call a Function Part 2 Ok, sorry for the 4 emails. A better way: http://www.commadot.com/jquery/events/ Also, here is a way to get fancy pants with it. Uses Brandon's behavior plugin. My first use of it. http://www.commadot.com/jquery/events/append.htm Glen On 7/21/07, *Glen Lipka* [EMAIL PROTECTED] wrote: Ok, sorry, Im dense today and clicking send too quickly. :( Yes, there is a better way. Ill whip up a demo. brb Glen On 7/21/07, *Glen Lipka* [EMAIL PROTECTED] wrote: I didnt quite understand what you are saying for the follow up questions. 1. best way to do what? 2. Which statement is getting repeated that you dont want to? Glen On 7/21/07, *Glen Lipka* [EMAIL PROTECTED] wrote: The height of the div id=nest is 208px, but the image inside it is 260px; Line 40. Make them both 260 and it should stop clipping. Glen On
[jQuery] Re: Dynamically set function settings?
HI Michael, Thank you so much for the very informative answer. I believe it will serve me well in the future. I guess what I was driving at, was rewriting a function in the head of my page. But I see now that I can simply call dynamically generated functions from the head - so there is no need to rewrite the functions that reside there. Cheers! Michael Geary wrote: From: juliandormon Is it possible to write javascript dynamically so new functions are created with the new parameters once the user makes a change? These functions need to be added to the head of my page because they get called after other functions. In other words, the new functions interact with the javascript that's already on the page. I guess they could be written elsewhere dynamically within a main function and I simply call this remote function and thereby any sub functions that have been written to it. Is this possible? JavaScript is a dynamic language. A *very* dynamic language. You can do anything, any time. JavaScript functions do not reside in the head nor the body of the document. All global functions are actually properties of the window object. Where or when you define them has no effect on that. Consider this piece of code: myfunction = function() { alert( 'hi!' ); }; You could execute that code in a script tag in the head, in a script tag in the body, in a script that you load dynamically, or in a script that you *create on the fly*. It will do the same thing regardless. How about this one: eval( myfunction = function() { alert( 'hi!' ); }; ); That does exactly the same thing, but now you're using a string that you could have generated any way you like. If there is other code in the page that calls myfunction(), and you later redefine myfunction, that existing code will start using your new function. One exception: Suppose a piece of code does this, or something like it: var savemyfunction = myfunction; And then that code calls savemyfunction(). Code like that will not pick up your new function definition, because it has already saved a reference to the previous myfunction. I didn't look at your specific question about innerFade, I'm just addressing the general question of defining functions dynamically. -Mike -- View this message in context: http://www.nabble.com/Dynamically-set-function-settings--tf4120797s15494.html#a11727629 Sent from the JQuery mailing list archive at Nabble.com.
[jQuery] Re: superfish delay not working
Thanks for the response, Joel. Your first post was posted half an hour after mine, but for some reason showed up before it. Your explanation of the CSS behavior was very helpful. I was able to adjust the CSS with some trial and error until I got my menu to work, and the CSS version working with JS disabled.
[jQuery] Re: ANNOUNCE: fr.jquery.com/planet
I'm glad to hear about this news. Can't subscribe to the Rss Feed. Richard D. Worth a écrit : There's a new jQuery planet[1], and it speaks French: http://fr.jquery.com/planet We've got two french jQuery blogs syndicated so far: Gastero Prod jquery.info Note: fr.jquery.com (without the /planet) is a work in progress. For now it just redirects to jquery.com. Stay tuned. - Richard [1] http://www.nabble.com/-ANNOUNCE--planet.jquery.com-tf4070087s15494.html
[jQuery] Re: jQuery jEditable
Thanks for your reply...I read those links but I'm new to all this coding stuff. I sent you an Email anyway. On Jul 21, 4:21 pm, Richard D Shank [EMAIL PROTECTED] wrote: First, never insert input into a database with filter it first. It makes you vulnerable for an attack. You can read this article to get a better understanding. http://shiflett.org/articles/input-filtering Second, it looks like you are wanting to update the data in the database (you are passing an id in). If this is the case, you will want to use UPDATE instead of INSERT. If you go tohttp://dev.mysql.comyou can search to find how to use the UPDATE syntax. If you are still stuck after search it out, email me off the list and I'll try to help you through it. Richard Aureole wrote: I'm using the jEditable plugin which can be found here: http://www.appelsiini.net/~tuupola/258/jeditable-in-place-editor-plug... The examples files for saving to a database use Pear DB and SQL Lite or something... I've been trying to get it to work with MYSQL but so far I've had no luck. Here is the code I have for save.php /CODE ?php require_once 'dbConnection.php'; function getLastID() { $id = mysql_fetch_row(mysql_query(SELECT LAST_INSERT_ID(), $this- linkId)); return $id[0]; } $query=INSERT INTO edits(id, token, value) VALUES('$_POST[id]', '%s', '$_POST[value]'); if(!mysql_db_query($dbname,$query,$link_id)) die(mysql_error()); (stripslashes($_POST['value'])); $result = mysql_query($query); usleep(2000); print $_POST['value']; ? /END CODE I really have no idea what I'm doing when it comes to PHP/MYSQL... Can anyone help me get it working?
[jQuery] Re: What am I missing from this plugin?
On 7/18/07, Dan G. Switzer, II [EMAIL PROTECTED] wrote: You need to var the generate_to variable in the click handler. Currently it's a global variable, which makes the second instance overwrite the first instance. Change: generate_to = $(this).attr('for'); to: var generate_to = $(this).attr('for'); Thanks. This works perfectly. Also, I think I'd change the plug-in a bit. IMO, I would make more sense to use like: $(#button).generate_password(#passwordField, iLength); That way you can attach the behavior to any element. Also, by using a selector for the field to update, you could update multiple fields with the same value (in those cases where you had both a password and confirm password fields.) I think I understand but how do I handle the #passwordField part within the plugin? Thanks, Chris.
[jQuery] Jquery doesn't work with mod_rewrite ?
Hello, I've already post this message in another lists wihch was not the right one. Hello, First of all, I'd like to say that the JQuery lib is the best I've ever used ! But I've a tiny problem with my script. I'm rewriting URLs with the mod_rewrite and when I try to run JavaScript scripts powered by JQuery, it doesn't work if it's a rewritten URL and I can't fix that. Can you help me ? Thanks in advance, Nico. I've tried to use absolute and relative path in my src attribute in my script element but none of them fixed my problem. Jquery.js is correctly loaded but I can't run any of the functions. Thanks, Nico.
[jQuery] interface plugin not working with jquery 1.1.3.1?
I had the following jquery script in my web page and it worked fine with jquery 1.1.2. After an upgrade to jquery 1.1.3.1, the Bounce effect causes errors according to Firebug. The error is jQuery.easing[e.easing] is not a function Not sure if anyone else has noticed this or if there is a workaround. $(document).ready(function(){ $('div#step1_animation').click(function() { $('div#step1container').SlideOutLeft(1000, function(){ $('#visualNav').append('div id=stepThumbimg src=images/ create_step1_animation.jpg height=100% width=100% // div').Bounce(10)}); return false; }); });
[jQuery] Re: Click to Call a Function Part 2
I believe I am getting it. I bet all the luckers are rolling on the floor with laughter at my naivety. That's fine, I can look silly. I'd love to see your table example so I can hammer this home. Seeing the code would help me understand how this gets turned into a colored background. because this statement Whatever row the user clicked on...climb up to the TR and give it a new css class called Foo. Just brought up more questions. What does climb up mean? How does assigning a class to a certain row make it change color? Do you mean the class has a css statement in it for background-color: #FF for example? Mitch From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Saturday, July 21, 2007 5:22 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Click to Call a Function Part 2 $(this) is the anchor link the user clicked on. What is nice about jquery is the whole concept of $(this). Once you know what the user moused over or clicked on or dragged or whatever, you have a place to start in your code. For instance, let's say you had a table with ten rows. and this code: $('td').click(function(){ $(this).parents(tr).addClass(foo); }); That means you would be binding a click event to EVERY row, and use one single click function to mean, Whatever row the user clicked on...climb up to the TR and give it a new css class called Foo. It's incredibly powerful. One of my first jQuery examples used the same thing but with a mouseover instead of a click. That let me highlight the background of the row the user was one. My goodness, I was so happy to be gone with onmouseover and onmouseout of every single TR. This line: $(#console a. + type).fadeIn(1000); Basically what it means is that I want to end up with one of the following: $(#console a.click).fadeIn(1000); $(#console a.over).fadeIn(1000); $(#console a.out).fadeIn(1000); But rather than make 3 lines. I used a flexible feature of jQuery which is using variables in the middle of the statement. I ended the part in quotes after the a-dot, and then used + type. Type is just a made up word. I could have said eventType or Foo. If you notice all the lines that call this had the type in the parenthethes. showLink( over). So it's kind of like a fancy CSS rule builder using a variable. I consider it an advanced technique (FOR ME). I am not a programmer. The tutorials are a great place to start. I would do all the basic examples first. You will be surprised how much foundation they give you. Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: There is LOT going on in your excellent examples, lots for me to ponder. For the first example it appears that first you make single container called #console which you use to display what I think are links (a). Then you set its display to none so its invisible. $(document).ready(function(){ $('#nest').click(function(){ showLink(click); }); $('#nest').mouseover(function(){ showLink(over); }); $('#nest').mouseout(function(){ showLink(out); }); $('#console a').click(function(){ $(this).fadeOut(slow); }); }); Here I believe you attaching four mouse events to the #nest div, and calling the showlink function with a parameter that displays the name of the event. This so much simpler then my approach where I hide and showed DIVs that contained static messages. However my actual goal is not to display messages but to reveal more graphics but how would you have known that? So I will next post what my actual goal is in a new demo. Still I love this method. $('#console a').click(function(){ $(this).fadeOut(slow); }); I think this cool piece of code says that any link in the div #console should fadeout slowly if it receives a click. I don't know what (this) means however. function showLink(type) { $(#nest).fadeTo(1000, .5); $(#console a. + type).fadeIn(1000); } I think this function does a double duty which I did not know you could do. First $(#nest).fadeTo(1000, .5); fades the #nest image to 50%. However unlike my example yours fades on any mouseover, mine just did it on a click event. That's because all you events call the same routine. I would like to distinguish the Mouseover from the Click. Then I think this piece of code, which again is a lot for a beginner $(#console a. + type).fadeIn(1000); Takes any link that has been clicked and somehow comes up with a string like mouse over, but god only knows how it works. Thanks for all the emails, I'll take as many as you can deliver. I'm going to wait till I grok this before moving to the fancy smanchy one. Mitch From: jquery-en@googlegroups.com [mailto: mailto:jquery-en@googlegroups.com [EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Saturday, July 21, 2007 2:43 PM
[jQuery] Re: Click to Call a Function Part 2
here is a demo of the table http://www.commadot.com/jquery/events/table.htm You should think about your html like a giant tree. The html tag is the trunk, then the body tag is a branch, and then the table tag is a branch off that, and so on and so on, down through each nested item. Climbing up means towards the trunk of the tree. Siblings are branches right next to something. A great tool, which is sounds like you may not have it Firebug for Firefox and IE Dev Toolbar for Internet Explorer. They are MUST HAVE tools for any web developer. They are absolutely essential. Google for them and you will see. Ooops, kids need to be brought to the park. Gotta run. :) Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: I believe I am getting it. I bet all the luckers are rolling on the floor with laughter at my naivety. That's fine, I can look silly. I'd love to see your table example so I can hammer this home. Seeing the code would help me understand how this gets turned into a colored background. because this statement Whatever row the user clicked on...climb up to the TR and give it a new css class called Foo. Just brought up more questions. What does climb up mean? How does assigning a class to a certain row make it change color? Do you mean the class has a css statement in it for background-color: #FF for example? Mitch *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Glen Lipka *Sent:* Saturday, July 21, 2007 5:22 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: Click to Call a Function Part 2 $(this) is the anchor link the user clicked on. What is nice about jquery is the whole concept of $(this). Once you know what the user moused over or clicked on or dragged or whatever, you have a place to start in your code. For instance, let's say you had a table with ten rows. and this code: $('td').click(function(){ $(this).parents(tr).addClass(foo); }); That means you would be binding a click event to EVERY row, and use one single click function to mean, Whatever row the user clicked on...climb up to the TR and give it a new css class called Foo. It's incredibly powerful. One of my first jQuery examples used the same thing but with a mouseover instead of a click. That let me highlight the background of the row the user was one. My goodness, I was so happy to be gone with onmouseover and onmouseout of every single TR. This line: $(#console a. + type).fadeIn(1000); Basically what it means is that I want to end up with one of the following: $(#console a.click).fadeIn(1000); $(#console a.over).fadeIn(1000); $(#console a.out).fadeIn(1000); But rather than make 3 lines. I used a flexible feature of jQuery which is using variables in the middle of the statement. I ended the part in quotes after the a-dot, and then used + type. Type is just a made up word. I could have said eventType or Foo. If you notice all the lines that call this had the type in the parenthethes. showLink( *over*). So it's kind of like a fancy CSS rule builder using a variable. I consider it an advanced technique (FOR ME). I am not a programmer. The tutorials are a great place to start. I would do all the basic examples first. You will be surprised how much foundation they give you. Glen On 7/21/07, *Mitchell Waite* [EMAIL PROTECTED] wrote: There is LOT going on in your excellent examples, lots for me to ponder. For the first example it appears that first you make single container called #console which you use to display what I think are links (a). Then you set its display to none so its invisible. $(document).ready(function(){ $('#nest').click(function(){ showLink(click); }); $('#nest').mouseover(function(){ showLink(over); }); $('#nest').mouseout(function(){ showLink(out); }); $('#console a').click(function(){ $(this).fadeOut(slow); }); }); Here I believe you attaching four mouse events to the #nest div, and calling the showlink function with a parameter that displays the name of the event. This so much simpler then my approach where I hide and showed DIVs that contained static messages. However my actual goal is not to display messages but to reveal more graphics but how would you have known that? So I will next post what my actual goal is in a new demo. Still I love this method. $('#console a').click(function(){ $(this).fadeOut(slow); }); I think this cool piece of code says that any link in the div #console should fadeout slowly if it receives a click. *I don't know what (this) means however.* function showLink(type) { $(#nest).fadeTo(1000, .5); $(#console a. + type).fadeIn(1000); } I think this function does a double duty which I did not know you could do. First $(#nest).fadeTo(1000, .5); fades the #nest image to 50%. However unlike my example yours fades on any
[jQuery] Re: Jquery doesn't work with mod_rewrite ?
What's your rewrite rule? I rewrite the URLs for the jquery.js files on jquery.com and never had any problems. --John On 7/21/07, Nico [EMAIL PROTECTED] wrote: Hello, I've already post this message in another lists wihch was not the right one. Hello, First of all, I'd like to say that the JQuery lib is the best I've ever used ! But I've a tiny problem with my script. I'm rewriting URLs with the mod_rewrite and when I try to run JavaScript scripts powered by JQuery, it doesn't work if it's a rewritten URL and I can't fix that. Can you help me ? Thanks in advance, Nico. I've tried to use absolute and relative path in my src attribute in my script element but none of them fixed my problem. Jquery.js is correctly loaded but I can't run any of the functions. Thanks, Nico.
[jQuery] Re: interface plugin not working with jquery 1.1.3.1?
Brian - This has already been fixed (in jQuery) and it's in SVN. It'll be in jQuery 1.1.4, which should be coming out soon. --John On 7/21/07, brianwilkins [EMAIL PROTECTED] wrote: I had the following jquery script in my web page and it worked fine with jquery 1.1.2. After an upgrade to jquery 1.1.3.1, the Bounce effect causes errors according to Firebug. The error is jQuery.easing[e.easing] is not a function Not sure if anyone else has noticed this or if there is a workaround. $(document).ready(function(){ $('div#step1_animation').click(function() { $('div#step1container').SlideOutLeft(1000, function(){ $('#visualNav').append('div id=stepThumbimg src=images/ create_step1_animation.jpg height=100% width=100% // div').Bounce(10)}); return false; }); });
[jQuery] Re: ANNOUNCE: fr.jquery.com/planet
I am able to at: http://fr.jquery.com/planet/atom.xml Let me know if you're still having problems. - Richard On 7/21/07, Jay Salvat [EMAIL PROTECTED] wrote: I'm glad to hear about this news. Can't subscribe to the Rss Feed. Richard D. Worth a écrit : There's a new jQuery planet[1], and it speaks French: http://fr.jquery.com/planet We've got two french jQuery blogs syndicated so far: Gastero Prod jquery.info Note: fr.jquery.com (without the /planet) is a work in progress. For now it just redirects to jquery.com. Stay tuned. - Richard [1] http://www.nabble.com/-ANNOUNCE--planet.jquery.com-tf4070087s15494.html
[jQuery] Re: Click to Call a Function Part 2
On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: I believe I am getting it. I bet all the luckers are rolling on the floor with laughter at my naivety. You won't find anyone laughing at you here. Learning is what this community is all about! You are asking some very good questions. I know I'm enjoying the dialog and Glen is doing a excellent job of answering your questions. The 'this' keyword can be pretty confusing at first because the object it represents changes depending on where you are using it. Actually Michael Geary had a very nice post to the list explaining the 'this' keyword a while back. Here is the post: http://groups.google.com/group/jquery-en/msg/92e29565dff28d32 Glen is correct in advising you to think about the html like a tree ... a DOM tree. jQuery takes a lot of the pain out of navigating around this tree with its selectors and DOM traversal methods. VisualjQuery.com organizes these methods very nicely. Go to http://visualjquery.com/ and then click on 'DOM' then 'Traversal'. Then you will see a listing of jQuery methods that help you navigate through the tree and pick which branches you want to work with. Once you have the elements you want to work with there are lots of methods that allow you to do things such as set attributes, animate and much more. Even better jQuery has loads of plugins that deal with more specialized needs. -- Brandon Aaron
[jQuery] Re: Click to Call a Function Part 2
Glen I have both those tools but I have only used them sparingly, to see outlines or find stuff. But now I will make better use of them. I believe I got it now with that table, thanks so much, hope I can make it up to you. I bought two books today that look like they have everything I need: Peachpit's Visual Quickstart guides on HTML, XHTML CSS, and another on CSS, DHTML AJAX.. I don t quite get the diff between X and D, but the XHTML book did not cover the DOM at all but the DHTML had a whole chapter on it. It s a lot of reading J Those kids are always wanting something and now you have me to deal with too J Mitch From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Saturday, July 21, 2007 7:33 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Click to Call a Function Part 2 here is a demo of the table http://www.commadot.com/jquery/events/table.htm You should think about your html like a giant tree. The html tag is the trunk, then the body tag is a branch, and then the table tag is a branch off that, and so on and so on, down through each nested item. Climbing up means towards the trunk of the tree. Siblings are branches right next to something. A great tool, which is sounds like you may not have it Firebug for Firefox and IE Dev Toolbar for Internet Explorer. They are MUST HAVE tools for any web developer. They are absolutely essential. Google for them and you will see. Ooops, kids need to be brought to the park. Gotta run. :) Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: I believe I am getting it. I bet all the luckers are rolling on the floor with laughter at my naivety. That's fine, I can look silly. I'd love to see your table example so I can hammer this home. Seeing the code would help me understand how this gets turned into a colored background. because this statement Whatever row the user clicked on...climb up to the TR and give it a new css class called Foo. Just brought up more questions. What does climb up mean? How does assigning a class to a certain row make it change color? Do you mean the class has a css statement in it for background-color: #FF for example? Mitch From: jquery-en@googlegroups.com [mailto: mailto:jquery-en@googlegroups.com [EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Saturday, July 21, 2007 5:22 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Click to Call a Function Part 2 $(this) is the anchor link the user clicked on. What is nice about jquery is the whole concept of $(this). Once you know what the user moused over or clicked on or dragged or whatever, you have a place to start in your code. For instance, let's say you had a table with ten rows. and this code: $('td').click(function(){ $(this).parents(tr).addClass(foo); }); That means you would be binding a click event to EVERY row, and use one single click function to mean, Whatever row the user clicked on...climb up to the TR and give it a new css class called Foo. It's incredibly powerful. One of my first jQuery examples used the same thing but with a mouseover instead of a click. That let me highlight the background of the row the user was one. My goodness, I was so happy to be gone with onmouseover and onmouseout of every single TR. This line: $(#console a. + type).fadeIn(1000); Basically what it means is that I want to end up with one of the following: $(#console a.click).fadeIn(1000); $(#console a.over).fadeIn(1000); $(#console a.out).fadeIn(1000); But rather than make 3 lines. I used a flexible feature of jQuery which is using variables in the middle of the statement. I ended the part in quotes after the a-dot, and then used + type. Type is just a made up word. I could have said eventType or Foo. If you notice all the lines that call this had the type in the parenthethes. showLink( over). So it's kind of like a fancy CSS rule builder using a variable. I consider it an advanced technique (FOR ME). I am not a programmer. The tutorials are a great place to start. I would do all the basic examples first. You will be surprised how much foundation they give you. Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: There is LOT going on in your excellent examples, lots for me to ponder. For the first example it appears that first you make single container called #console which you use to display what I think are links (a). Then you set its display to none so its invisible. $(document).ready(function(){ $('#nest').click(function(){ showLink(click); }); $('#nest').mouseover(function(){ showLink(over); }); $('#nest').mouseout(function(){ showLink(out); }); $('#console a').click(function(){ $(this).fadeOut(slow); }); }); Here I believe you attaching four mouse events to the #nest div, and calling the showlink function with a parameter that displays
[jQuery] Re: Click to Call a Function Part 2
Hey that's great you are enjoying this. And I am IN LOVE with the jQuery plugins, because of the fact that even if you don't know how they work, they are super easy to use. Man I have been trying kinds of cool stuff, tooltips, interface elements, rounded corners, it's like being a candy store. I can hardly imagine what will happen when I really understand this stuff J Glen has been fabulous and really thoughtful. Maybe this is karmic kickback for all those computer books I put my soul into? Thanks for the post from michael I am sure it's the most lucid writing on the planet. I think the tree analogy is sinking in but I have always thought it wasn't the best metaphor. How many trees have you seen with just one branch? And whose trunk starts in the sky and grows down? Even the parent/sibling thing leaves me hanging. Maybe I will stumble on something that works better in my visual cortex, if not it's a tree that is really lopsided from this one giant branch that everything else branches from. The GOD branch. To me a raindrop meandering down a wet window is easier to visualize. I swear to DOM I will get it one day! From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brandon Aaron Sent: Saturday, July 21, 2007 8:37 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Click to Call a Function Part 2 On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: I believe I am getting it. I bet all the luckers are rolling on the floor with laughter at my naivety. You won't find anyone laughing at you here. Learning is what this community is all about! You are asking some very good questions. I know I'm enjoying the dialog and Glen is doing a excellent job of answering your questions. The 'this' keyword can be pretty confusing at first because the object it represents changes depending on where you are using it. Actually Michael Geary had a very nice post to the list explaining the 'this' keyword a while back. Here is the post: http://groups.google.com/group/jquery-en/msg/92e29565dff28d32 Glen is correct in advising you to think about the html like a tree ... a DOM tree. jQuery takes a lot of the pain out of navigating around this tree with its selectors and DOM traversal methods. VisualjQuery.com organizes these methods very nicely. Go to http://visualjquery.com/ and then click on 'DOM' then 'Traversal'. Then you will see a listing of jQuery methods that help you navigate through the tree and pick which branches you want to work with. Once you have the elements you want to work with there are lots of methods that allow you to do things such as set attributes, animate and much more. Even better jQuery has loads of plugins that deal with more specialized needs. -- Brandon Aaron
[jQuery] Click to Call a Function: The Movie
Glen (and others): This looks better on a big screen but do I have this right? http://www.whatbird.com/wwwroot/images/addClass.gif Mitch PS How do I keep my email address from getting displayed on my messages? From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Glen Lipka Sent: Saturday, July 21, 2007 7:33 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Click to Call a Function Part 2 here is a demo of the table http://www.commadot.com/jquery/events/table.htm You should think about your html like a giant tree. The html tag is the trunk, then the body tag is a branch, and then the table tag is a branch off that, and so on and so on, down through each nested item. Climbing up means towards the trunk of the tree. Siblings are branches right next to something. A great tool, which is sounds like you may not have it Firebug for Firefox and IE Dev Toolbar for Internet Explorer. They are MUST HAVE tools for any web developer. They are absolutely essential. Google for them and you will see. Ooops, kids need to be brought to the park. Gotta run. :) Glen
[jQuery] Re: Click to Call a Function Part 2
Try this book. It's the first jQuery book. http://www.packtpub.com/jQuery/book Actually, I dont love the tree metaphor either. Rather think of it like the Windows File Structure. the C drive is the root HTML tag. And each folder is nested inside another one. Siblings are folders in the same parent folder. This is actually how I envision it, not really like an Oak tree. jQuery has saved me so much time and energy. It has also MADE money for the companies I work for. Helping out other people on the list is just a one way of paying back. I also donate to the jQuery project. Consider a small donation on jQuery.com if you feel jQuery has improved your own bottom line. it keeps the wheels in motion. Im glad I could help. Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: Hey that's great you are enjoying this. And I am IN LOVE with the jQuery plugins, because of the fact that even if you don't know how they work, they are super easy to use. Man I have been trying kinds of cool stuff, tooltips, interface elements, rounded corners, it's like being a candy store. I can hardly imagine what will happen when I really understand this stuff J Glen has been fabulous and really thoughtful. Maybe this is karmic kickback for all those computer books I put my soul into? Thanks for the post from michael I am sure it's the most lucid writing on the planet. I think the tree analogy is sinking in but I have always thought it wasn't the best metaphor. How many trees have you seen with just one branch? And whose trunk starts in the sky and grows down? Even the parent/sibling thing leaves me hanging. Maybe I will stumble on something that works better in my visual cortex, if not it's a tree that is really lopsided from this one giant branch that everything else branches from. The GOD branch. To me a raindrop meandering down a wet window is easier to visualize. I swear to DOM I will get it one day! *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Brandon Aaron *Sent:* Saturday, July 21, 2007 8:37 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: Click to Call a Function Part 2 On 7/21/07, *Mitchell Waite* [EMAIL PROTECTED] wrote: I believe I am getting it. I bet all the luckers are rolling on the floor with laughter at my naivety. You won't find anyone laughing at you here. Learning is what this community is all about! You are asking some very good questions. I know I'm enjoying the dialog and Glen is doing a excellent job of answering your questions. The 'this' keyword can be pretty confusing at first because the object it represents changes depending on where you are using it. Actually Michael Geary had a very nice post to the list explaining the 'this' keyword a while back. Here is the post: http://groups.google.com/group/jquery-en/msg/92e29565dff28d32 Glen is correct in advising you to think about the html like a tree ... a DOM tree. jQuery takes a lot of the pain out of navigating around this tree with its selectors and DOM traversal methods. VisualjQuery.com organizes these methods very nicely. Go to http://visualjquery.com/ and then click on 'DOM' then 'Traversal'. Then you will see a listing of jQuery methods that help you navigate through the tree and pick which branches you want to work with. Once you have the elements you want to work with there are lots of methods that allow you to do things such as set attributes, animate and much more. Even better jQuery has loads of plugins that deal with more specialized needs. -- Brandon Aaron
[jQuery] Re: Click to Call a Function: The Movie
:) This is really funny. I have never seen anything like this. Yes, I think it's accurate. One note: In general, try to keep the subject like the same and just click reply. In Gmail, that keeps the thread together. Otherwise, it looks like three threads. Makes it easier for people to skip a topic if they want. Glen On 7/21/07, Mitchell Waite [EMAIL PROTECTED] wrote: Glen (and others): This looks better on a big screen but do I have this right? http://www.whatbird.com/wwwroot/images/addClass.gif Mitch PS How do I keep my email address from getting displayed on my messages? *From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Glen Lipka *Sent:* Saturday, July 21, 2007 7:33 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: Click to Call a Function Part 2 here is a demo of the table http://www.commadot.com/jquery/events/table.htm You should think about your html like a giant tree. The html tag is the trunk, then the body tag is a branch, and then the table tag is a branch off that, and so on and so on, down through each nested item. Climbing up means towards the trunk of the tree. Siblings are branches right next to something. A great tool, which is sounds like you may not have it Firebug for Firefox and IE Dev Toolbar for Internet Explorer. They are MUST HAVE tools for any web developer. They are absolutely essential. Google for them and you will see. Ooops, kids need to be brought to the park. Gotta run. :) Glen