[jquery-dev] Re: jQuery - Development Environments?
If anyone is interested I just tried experimenting with a little something. I installed a ruby file system watcher: http://paulhorman.com/filesystemwatcher/ And setup this small little script: #!/usr/bin/env ruby require filesystemwatcher watcher = FileSystemWatcher.new() watcher.addDirectory(src, *.js) watcher.sleepTime = 5 watcher.start { |status,file| puts Building `make jquery` } watcher.join() So I basically run it with `./livebuild.rb` inside the jQuery directory, whenever I make a modification the script automatically rebuilds the jquery file. Then again, that jDevCloud idea has much more promise since you can use trunk, your own get clone, individual jquery versions, and even edit in-project versions. -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Enhancement suggestion: .css(['prop', 'prop', 'prop']);
At work when I was writing my own JavaScript framework (partly inspired in API by jQuery) I ran into a number of times where I needed to grab a series of css values and set them all onto another, as a result I ended up coming up with another type of input to .css; $(someNode).css(['backgroundColor', 'backgroundImage', 'width', 'height', 'position', 'top', 'left']); Basically I made .css accept a single array of property names to grab. The return is a object with property keys and values set on them. The absolute beauty of this, was that you could take that same object and set it onto another note, or even use it to revert. var cssCache = $(node).css(['display', 'width', 'height']); // Do a bunch of stuff to node that modifies all that kind of css. $(node).css(cssCache); // Revert to the original values Though I do take note now, another possibility which might fit in better with .addClass and .bind might be something like. $(someNode).css('backgroundColor backgroundImage width height position top left'); Though the fact that the difference between 'width' and 'width height' is the difference between .css returning a string or an array, so it might be worth it to use the array input format to avoid confusion. Any thoughts? This worth opening an enhancement ticket? -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] .unbind(func);
When I wrote my framework at work with a .bind method similar to jQuery I actually ended up adding another simple way to call it thinking jQuery supported it. $(node).unbind(); // everything $(node).unbind('type'); // all events of type $(node).unbind('type', func); // just the func event on type $(node).unbind(func); // func on all types; not supported by jQuery It's another useful call. I actually use it a fair bit at work since it's about as short as helper methods: function someClickEventFunc() { ... } $(node).click(someClickEventFunc); $(node).unbind(someClickEventFunc); Worth an enhancement ticket? -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] unexpected eq() operator precedence result
If I have a grid composed of row and cell div element as follows: div class=grid div class=row div class=cell/ div class=cell/ div class=cell/ /div div class=row div class=cell/ div class=cell/ div class=cell/ /div div class=row div class=cell/ div class=cell/ div class=cell/ /div /div Assuming I have a 'grid' variable pointing to the top grid div, and I want to return all the cells in the first 'column'. I would expect something like the following to work: $( div div:eq(0), grid). Actually, this doesn't work. it returns only the very first (top-left) cell. To get what I want I need to do something like: $( div:eq(0),$( div, grid)) I suppose that operator precedence is applying the eq(0) in the first statement to the entire selection AFTER both children operators, but this is counter-intuitive as the :eq(0) implies that it is applied specifically to the second 'div' selector - Eric --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: Enhancement suggestion: .css(['prop', 'prop', 'prop']);
On Sat, Mar 21, 2009 at 6:15 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: At work when I was writing my own JavaScript framework (partly inspired in API by jQuery) I ran into a number of times where I needed to grab a series of css values and set them all onto another, as a result I ended up coming up with another type of input to .css; $(someNode).css(['backgroundColor', 'backgroundImage', 'width', 'height', 'position', 'top', 'left']); Basically I made .css accept a single array of property names to grab. The return is a object with property keys and values set on them. The absolute beauty of this, was that you could take that same object and set it onto another note, or even use it to revert. var cssCache = $(node).css(['display', 'width', 'height']); // Do a bunch of stuff to node that modifies all that kind of css. $(node).css(cssCache); // Revert to the original values Though I do take note now, another possibility which might fit in better with .addClass and .bind might be something like. $(someNode).css('backgroundColor backgroundImage width height position top left'); +1 May return an object {background-color:value,background-image:value,...} , so you can apply it to $.fn.css(object) directly. Though the fact that the difference between 'width' and 'width height' is the difference between .css returning a string or an array, so it might be worth it to use the array input format to avoid confusion. Any thoughts? This worth opening an enhancement ticket? -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: Enhancement suggestion: .css(['prop', 'prop', 'prop']);
I ran into a number of times where I needed to grab a series of css values and set them all onto another, This functionality overlaps with what you were proposing in #4295 but to me it seems like a better way to do it because you can explicitly get the individual properties you want rather than making jQuery parse (and the caller interpret) the complex shorthand situations. http://dev.jquery.com/ticket/4295 var cssCache = $(node).css(['display', 'width', 'height']); To make it optionally chainable I'd add the ability to pass in an object as the second argument so you could do this: var saved = {}; $(node) .css(['display', 'width', 'height'], saved) .something().mangling().theNode() .css(saved); This particular example is really similar to the internal swap() method though, so maybe there's some way to publish that in a reasonable way instead. http://dev.jquery.com/browser/trunk/jquery/src/attributes.js#L180 I played with something like this a couple of years back but it just seemed like too much code to include in the core. Perhaps the best start is to see how it looks as a plugin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: unexpected eq() operator precedence result
Try $( div div:first-child, grid) On Sat, Mar 21, 2009 at 7:18 PM, Obinna obi...@gmail.com wrote: If I have a grid composed of row and cell div element as follows: div class=grid div class=row div class=cell/ div class=cell/ div class=cell/ /div div class=row div class=cell/ div class=cell/ div class=cell/ /div div class=row div class=cell/ div class=cell/ div class=cell/ /div /div Assuming I have a 'grid' variable pointing to the top grid div, and I want to return all the cells in the first 'column'. I would expect something like the following to work: $( div div:eq(0), grid). Actually, this doesn't work. it returns only the very first (top-left) cell. To get what I want I need to do something like: $( div:eq(0),$( div, grid)) I suppose that operator precedence is applying the eq(0) in the first statement to the entire selection AFTER both children operators, but this is counter-intuitive as the :eq(0) implies that it is applied specifically to the second 'div' selector - Eric --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: Set offset
We're building this into jQuery UI, most likely for 1.8 ( http://wiki.jqueryui.com/PositionTo ). We should figure out what parts can/should go into core and what should go into jQuery UI. On Mar 20, 8:35 pm, Brandon Aaron brandon.aa...@gmail.com wrote: Cool. I'll take a look at this soon. We might also want to make .position() a setter at the same time. I've gone ahead and added it to the list of potential features for 1.4.http://docs.jquery.com/JQuery_1.4_Roadmap#Offset -- Brandon Aaron On Fri, Mar 20, 2009 at 6:49 PM, DanB givedanmo...@gmail.com wrote: Currently you can't set the offset of jquery by passing in an object with left and top values. Some people set left and top with $(el).css ({left:px, top:px}, but that will not work if el is inside an element with position relative, because the left and top will be relative to that parent instead of the window. I created a plugin that keeps the getting of the offset intact, but also adds the ability to set the offset relative to the window - regardless of the positioning of parents. I think this should be added to the next release. http://plugins.jquery.com/project/setOffset --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: .unbind(func);
+1 And I wonder why you need your own framework :P On Sat, Mar 21, 2009 at 6:27 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: When I wrote my framework at work with a .bind method similar to jQuery I actually ended up adding another simple way to call it thinking jQuery supported it. $(node).unbind(); // everything $(node).unbind('type'); // all events of type $(node).unbind('type', func); // just the func event on type $(node).unbind(func); // func on all types; not supported by jQuery It's another useful call. I actually use it a fair bit at work since it's about as short as helper methods: function someClickEventFunc() { ... } $(node).click(someClickEventFunc); $(node).unbind(someClickEventFunc); Worth an enhancement ticket? -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: .animate({prop: 'show'}) to animate set size to natural size
And how is the natural height determined if you've already explicitly overwritten it with another value? --John On Fri, Mar 20, 2009 at 9:11 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: At work I tried to animate something to grow horizontally then grow vertically. .hide().css({height: 5}) // Use a small initial height so the growing can be seen .animate({width: show}) .animate({height: show}); The second half of the animation of course does not work because show only animates a non-shown value to it's natural state. I do not believe there is a proper way (besides doing ugly manual calculations and basically duplicating some jQuery internal tricks outside of jQuery) to smootly animate something to it's natural state. Perhaps we could use something like a new natural option. .hide().css({height: 5}) // Use a small initial height so the growing can be seen .animate({width: natural}) .animate({height: natural}); -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] jQuery.props should have mapping for colspan - colSpan
Internet Explorer does not accept the attribute colspan and instead requires colSpan with a capitol 'S'. jQuery.props already has a mapping for rowspan - rowSpan. Shouldn't a mapping for colspan - colSpan be added as well? Thanks! Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: jQuery.props should have mapping for colspan - colSpan
Probably, yeah - could you file a ticket? --John On Sat, Mar 21, 2009 at 1:57 PM, David Citron dcit...@gmail.com wrote: Internet Explorer does not accept the attribute colspan and instead requires colSpan with a capitol 'S'. jQuery.props already has a mapping for rowspan - rowSpan. Shouldn't a mapping for colspan - colSpan be added as well? Thanks! Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: .unbind(func);
Originally the lead programmer wanted to avoid making the core of the application dependent on any specific JavaScript framework. So I ended up writing a small one. Now we're trying to migrate to one that can be isolated nicely (jQuery) now that he's gone. Right now I'm picking at small differences (The framework I wrote was actually inspired by jQuery) and finding various parts that can improve jQuery, and things needing extensibility that get in the way of the ability to cleanly use jQuery inside the app. ~Daniel Friesen (Dantman, Nadir-Seen-Fire) Cloudream wrote: +1 And I wonder why you need your own framework :P On Sat, Mar 21, 2009 at 6:27 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: When I wrote my framework at work with a .bind method similar to jQuery I actually ended up adding another simple way to call it thinking jQuery supported it. $(node).unbind(); // everything $(node).unbind('type'); // all events of type $(node).unbind('type', func); // just the func event on type $(node).unbind(func); // func on all types; not supported by jQuery It's another useful call. I actually use it a fair bit at work since it's about as short as helper methods: function someClickEventFunc() { ... } $(node).click(someClickEventFunc); $(node).unbind(someClickEventFunc); Worth an enhancement ticket? -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: .unbind(func);
I remember someone mentioning something like: .unbind(*, fn) It could also apply to other things like: .unbind(*.foo, fn) .bind(*, fn) --John On Sat, Mar 21, 2009 at 6:16 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: Originally the lead programmer wanted to avoid making the core of the application dependent on any specific JavaScript framework. So I ended up writing a small one. Now we're trying to migrate to one that can be isolated nicely (jQuery) now that he's gone. Right now I'm picking at small differences (The framework I wrote was actually inspired by jQuery) and finding various parts that can improve jQuery, and things needing extensibility that get in the way of the ability to cleanly use jQuery inside the app. ~Daniel Friesen (Dantman, Nadir-Seen-Fire) Cloudream wrote: +1 And I wonder why you need your own framework :P On Sat, Mar 21, 2009 at 6:27 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: When I wrote my framework at work with a .bind method similar to jQuery I actually ended up adding another simple way to call it thinking jQuery supported it. $(node).unbind(); // everything $(node).unbind('type'); // all events of type $(node).unbind('type', func); // just the func event on type $(node).unbind(func); // func on all types; not supported by jQuery It's another useful call. I actually use it a fair bit at work since it's about as short as helper methods: function someClickEventFunc() { ... } $(node).click(someClickEventFunc); $(node).unbind(someClickEventFunc); Worth an enhancement ticket? -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: .unbind(func);
.unbind() .unbind(type); .unbind(type, func); Using .unbind(func); seams the most logical since the pattern looks like you're just ommitting whatever you aren't specifying specifically. What would *.foo do? Though as for .bind(*, fn); I don't see how that could really be done. There are dozens of event types, more being added, then there are custom and namespaced events. ~Daniel Friesen (Dantman, Nadir-Seen-Fire) John Resig wrote: I remember someone mentioning something like: .unbind(*, fn) It could also apply to other things like: .unbind(*.foo, fn) .bind(*, fn) --John On Sat, Mar 21, 2009 at 6:16 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: Originally the lead programmer wanted to avoid making the core of the application dependent on any specific JavaScript framework. So I ended up writing a small one. Now we're trying to migrate to one that can be isolated nicely (jQuery) now that he's gone. Right now I'm picking at small differences (The framework I wrote was actually inspired by jQuery) and finding various parts that can improve jQuery, and things needing extensibility that get in the way of the ability to cleanly use jQuery inside the app. ~Daniel Friesen (Dantman, Nadir-Seen-Fire) Cloudream wrote: +1 And I wonder why you need your own framework :P On Sat, Mar 21, 2009 at 6:27 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: When I wrote my framework at work with a .bind method similar to jQuery I actually ended up adding another simple way to call it thinking jQuery supported it. $(node).unbind(); // everything $(node).unbind('type'); // all events of type $(node).unbind('type', func); // just the func event on type $(node).unbind(func); // func on all types; not supported by jQuery It's another useful call. I actually use it a fair bit at work since it's about as short as helper methods: function someClickEventFunc() { ... } $(node).click(someClickEventFunc); $(node).unbind(someClickEventFunc); Worth an enhancement ticket? -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: .animate({prop: 'show'}) to animate set size to natural size
We swap the value out to get the value, but don't unset the value - and that's only for height and width. What you're talking about can be done like this: var height = $(this).height(); $(this).hide().css({height: 5}) .animate({width: show}) .animate({height: height}); That looks pretty simple to me! --John On Sat, Mar 21, 2009 at 6:18 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: I believe jQuery does it using swap and unsetting the value, right? ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com] -Nadir-Point Wiki-Tools (http://nadir-point.com) (http://wiki-tools.com) -MonkeyScript (http://monkeyscript.org) -Animepedia (http://anime.wikia.com) -Narutopedia (http://naruto.wikia.com) -Soul Eater Wiki (http://souleater.wikia.com) John Resig wrote: And how is the natural height determined if you've already explicitly overwritten it with another value? --John On Fri, Mar 20, 2009 at 9:11 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: At work I tried to animate something to grow horizontally then grow vertically. .hide().css({height: 5}) // Use a small initial height so the growing can be seen .animate({width: show}) .animate({height: show}); The second half of the animation of course does not work because show only animates a non-shown value to it's natural state. I do not believe there is a proper way (besides doing ugly manual calculations and basically duplicating some jQuery internal tricks outside of jQuery) to smootly animate something to it's natural state. Perhaps we could use something like a new natural option. .hide().css({height: 5}) // Use a small initial height so the growing can be seen .animate({width: natural}) .animate({height: natural}); -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: .unbind(func);
.unbind() .unbind(type); .unbind(type, func); Using .unbind(func); seams the most logical since the pattern looks like you're just ommitting whatever you aren't specifying specifically. What would *.foo do? Unbind everything that has that namespace. http://docs.jquery.com/Namespaced_Events Though as for .bind(*, fn); I don't see how that could really be done. There are dozens of event types, more being added, then there are custom and namespaced events. It would only fire for when other events are bound. --John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: .animate({prop: 'show'}) to animate set size to natural size
The problem there is that the height there becomes the end height. show unsets the value after animation. A little more like. var height = $(this).height(); $(this).hide().css({height: 5}) .animate({width: show}) .animate({height: height}, {complete: function() {$(this).css(height, );}}); But the idea of natural is that it can be used in more cases. Basically it's a transition from any set property, to what it would be like if it was unset. ~Daniel Friesen (Dantman, Nadir-Seen-Fire) John Resig wrote: We swap the value out to get the value, but don't unset the value - and that's only for height and width. What you're talking about can be done like this: var height = $(this).height(); $(this).hide().css({height: 5}) .animate({width: show}) .animate({height: height}); That looks pretty simple to me! --John On Sat, Mar 21, 2009 at 6:18 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: I believe jQuery does it using swap and unsetting the value, right? ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com] -Nadir-Point Wiki-Tools (http://nadir-point.com) (http://wiki-tools.com) -MonkeyScript (http://monkeyscript.org) -Animepedia (http://anime.wikia.com) -Narutopedia (http://naruto.wikia.com) -Soul Eater Wiki (http://souleater.wikia.com) John Resig wrote: And how is the natural height determined if you've already explicitly overwritten it with another value? --John On Fri, Mar 20, 2009 at 9:11 PM, Daniel Friesen nadir.seen.f...@gmail.comwrote: At work I tried to animate something to grow horizontally then grow vertically. .hide().css({height: 5}) // Use a small initial height so the growing can be seen .animate({width: show}) .animate({height: show}); The second half of the animation of course does not work because show only animates a non-shown value to it's natural state. I do not believe there is a proper way (besides doing ugly manual calculations and basically duplicating some jQuery internal tricks outside of jQuery) to smootly animate something to it's natural state. Perhaps we could use something like a new natural option. .hide().css({height: 5}) // Use a small initial height so the growing can be seen .animate({width: natural}) .animate({height: natural}); -- ~Daniel Friesen (Dantman, Nadir-Seen-Fire) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: Enhancement suggestion: .css(['prop', 'prop', 'prop']);
I ran into a number of times where I needed to grab a series of css values and set them all onto another, This functionality overlaps with what you were proposing in #4295 That bug has nothing to do with the caller interpreting complex shorthands. I agree; I was looking at the functionality you wanted in your original statement--grabbing a series of css values. I see no reason to require people to use $(node).css(['marginTop', 'marginRight', 'marginBottom', 'marginLeft']); when it's perfectly valid (and more likely) for them to try using $(node).css('margin'); With .css(margin) (or border or padding) it seems like there is only one thing a caller could reasonably do without parsing it--pass it back to .css(margin, value) to be set. Are there a lot of situations where that is needed? I can see useful cases for .css([prop1, prop2]) but not many for css(shorthandProperty). If you have the former, the amount of code you need to write inside your own app will probably be less than if you had the latter and tried to parse out the individual properties. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: Shouldnt val(val) accept a simple string, number, or boolean for radios?
If you say $(#myradio).val(42) it will set the value attribute of the element with id=myradio to the value 42. Are you proposing that do something else instead? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups jQuery Development group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---