*From:* jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED]
*On Behalf Of *Felix Geisendörfer
*Sent:* Tuesday, November 06, 2007 1:46 PM
*To:* jquery-en@googlegroups.com
*Subject:* [jQuery] remove() deletes events in jQuery 1.2.1. Why?
Hey,
I
Hey,
I recently upgraded my app from jQuery 1.3.1 to 1.2.1 and the transition
was incredibly easy.
However, yesterday I noticed that $().remove() now seems to behave
differently then it did in 1.3.1. Thats because now it deletes any
events attached to the element removed. This happens to be
Hey,
We're taking over people...we'll soon be reaching critical mass where
businesses will be LOOKING for people who know jQuery!
Are you kidding me? This has long happened! I've seen a ton of job / gig
advertisements asking for jQuery expertise in the past : ). But yeah,
eventually people
Here is an interesting blog post that I came across:
http://blog.stevenlevithan.com/archives/faster-than-innerhtml
The synopsis basically is that one can gain dramatic speed improvements
on setting innerHTML when removing items that are going to be
overwritten using DOM methods before
Very cool! That's a great idea to save traffic and optimize load times
on image heavy pages.
-- Felix
--
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de
Mika Tuupola wrote:
Little something I worked on sunday.
Um, that's not really a donation then, is it?
--John
This probably needs a new / better term. I read a while ago about some
independent musician making more money then he/she'd make on iTunes by
letting the people decide how much they pay for it. Theoretically you
could 'donate' $0.01.
I saw that, but I want to
actually display the calendar itself, not just on popup, but fully
displayed.
AFAIK kevin's plugin is capable to do this. See: http://kelvinluck.com/assets/jquery/datePicker/v2/demo/renderCalendar.html
-- Felix
--
My Blog:
Hey folks,
I need to select all but the first and the 3 last rows of a table. I
found out that the following works:
$('table tr:gt(0):not(:last:last:last)')
Whoever it does not seem particular elegant to me and jQuery is always
(!) elegant, so I'm wondering if one of you could come up with
Yeah that one-liner is sweet. I guess I was thinking too much about a
selector. The project I need this for does run an older jQuery version
and the deadline is preparing to make this ugly ugly sound that you get
when not only upsetting the client but also ruining his business - so
updating,
This just cried for an elegant solution, and I'm in
anything-but-client-work-mood again : ). So here it comes:
Usage:
---
var Stack = new Callstack();
$.getJSON(jsonA.js, {}, Stack.add('requestA'));
A bit dated, but maybe kind of what you are looking for:
http://sonspring.com/journal/jquery-portlets
-- Felix
--
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de
Andy Matthews wrote:
Hey
all...
I'm
in the process of writing
My function for cloning looks like this: It covers objects, arrays,
functions and jQuery objects / custom objects with an own clone() function:
--
;
}
return obj;
}
}
-- Felix
On Aug 5, 7:42 pm, the_undefined [EMAIL PROTECTED] wrote:
Ups, that last line should read:
return obj;
not 'return clone;'.
On Aug 5, 7:30 pm, Felix Geisendörfer [EMAIL PROTECTED] wrote:
My function
You rock! I cannot imagine working without your plugin on complex/fancy
UI stuff anymore ; ).
-- Felix
--
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de
Brandon Aaron wrote:
The 1.0 release of Dimensions is finally here. It has been a long
Cool idea. Just add support for a class that's being added to the button
when in 'confirm' mode - otherwise there is no way to visually highlight
this new UI approach for the user ; ).
-- Felix
--
My Blog: http://www.thinkingphp.org
My Business:
I have over 1000 emails a day frequently... and then there are RSS
feeds. I don't read them all. Wasn't trying to be smart, don't flame
someone until they earn it. :)
You should forward most of that to people who actually have the time to
read that many emails and are chronically depressed
Alternately,
does anyone know of some reliable piece of software which does this
same sort of thing, but maybe cheaper?
Google Analytics - it's free.
-- Felix
--
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de
Andy Matthews wrote:
We wouldn't use it in
"real-time" but we would need to be able to store that data ourselves
and not just access it via their interface.
You can aggregate and store it yourself. I wrote some code a while back
that does that (it's for the CakePHP framework but could be decoupled
from it or
Nifty idea, but this will only work within a single domain, right?
No there is a proxy.php file to the package that allows you to load RSS
files from other sites. Or just read the files locally on his server if
you get bored (hint: check the fopen call : ).
-- Felix
BTW, a basic one is provided in the archive for testing purposes.
Oh in that case nevermind my last post. I guess the proxy.php is alright
for *local* testing.
-- Felix
--
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de
Jean-Francois
No kidding. I was disappointed to read about some of the missing
things from javascript's implementation of regular expressions. No
named groups and no look behinds. I'm still very new to javascript as
a language, so I'm still feeling my way around some things. I'll post
some results
Christof: I appreciate your comments. Even more however I would have
appreciated if you'd have taken into consideration why I made the
proposal. I didn't do so because I personally need this functionality,
but because I think both exists() and hasClass() would make the library
more accessible
But I don't think we disagree at all. I wasn't talking about .get() with no
arguments, but rather .get(n) and .size(), which are just slower synonyms
for [n] and .length.
Yeah I agree with you on that. I just read: 'we should get rid of the
get() function' and freaked : p
-- Felix
if ($('#someID')) {
// something matched the selector
}
See, and there you go making a wrong assumption that beginners are much
more likely to run into. !![] is evaluating to true and so is a jQuery
object that has not matched any items. I'm not blaming you for it, it's
In fact, if you find yourself doing a lot of if(something exists) {
... } else { ...}, you might want to consider trying to move some of
your code into a plugin.
The target audience for an exists() function would be new comers to
jQuery. Those are generally a little scared about writing their
jQuery is a language
It was a library last time I checked ; ).
and as such requires you to read at least a bit
of documentation or examples before starting.
Why? For me the sweetest thing about using jQuery has been it's
intuitiveness right out of the box. When I started I just looked at some
() that
one time.
-- Felix
--
My Blog: http://www.thinkingphp.org
My Business: http://www.fg-webdesign.de
Klaus Hartl wrote:
Felix Geisendörfer wrote:
Felix, not to worry, there's nothing wrong at all with using .length
- and it is obviously faster than a function call.
I
ok, so next time i want to code something in jquery i'll just write
$(make coffee) ?
Haha, now I'm questioning your ambition. This is the holy grail of all
programming, it's almost blasphemy to make fun of it ; ).
For me (and I really mean not speaking for everyone) it's more
intuitive if
I've just been wondering if jQuery has some syntactic sugar for checking
if an element exists. I know the following works:
if ($('#my-element').length) {
// #my-element exists
}
Sean, Mike: I agree with your notion that learning that the jQuery
object is array-like (It'd be cool if it was a real array and .push /
.sort would work on it) is very worthwhile. I knew that when I initially
stumbled across the problem and knew that doing it via '.length' was one
solution. I
*From:* Felix Geisendörfer
Sean, Mike: I agree with your notion that learning that the jQuery
object is array-like (It'd be cool if it was a real array and
.push / .sort would work on it) is very worthwhile. I knew that
when I initially stumbled across
I like it simple:
[x] .mask
[ ] .maskInput
-- Felix
--
My latest blog posts:
My Business: http://www.fg-webdesign.de
Josh Bush wrote:
As my masked input plugin approaches 1.0, I'm noticing that my plugin
isn't following the conventions of the jQuery
I would prefer .maskInput as the method name,
coz, it conveys both the
intention and what it applies to. "mask" doesnt convey where it applies
to and probably can be used for a more generic plugin.
$('input.date').mask(...) should be good enough to imply what is meant
I think. I used to be in
I want to maintain proportion, but scale it to
fit in the view port.0
Got some PHP code laying around that does just that. Should be easy to
convert to JS:
Untested, off the cuff:
centerPosition: function(objWidth, objHeight, boxWidth, boxHeight) {
return {
top: (boxWidth / 2) - (objWidth / 2)
, left: (boxHeight / 2) - (objHeight / 2)
}
}
var $myDiv = $('#my-div');
var $screen = $(document);
mvDiv.css(centerPosition(myDiv.width(),
Thanks for that plugin : ).
Call / apply are ones best friends when working with JS. Incredibly
powerful stuff when used right. One of my favorite uses apply is to use
it on a new array instance to force 'arguments' variable to behave like
a real array and re-route function arguments based on
On an (un)related note: Is anybody having rendering quirks with the
Safari 3 beta on Win XP? I just noticed that a couple sites of mine that
I thought would render well in Safari are messed up. Even Google Ads
seems to be affected.
Anybody with similar problems?
-- Felix
PS: Click on the
to actually interpret
the results coming from those speed tests and hence one should be very
careful when using them to make a point for one lib being faster then
another.
-- Felix Geisendörfer aka the_undefined
--
http://www.thinkingphp.org
http://www.fg-webdesign.de
I have SERIOUS, SERIOUS doubts that there are 18 million people using
Safari.
I doubt there are that many people using Macs to be perfectly honest.
I also think that FF numbers are underestimated and IE numbers
overesimtated: See http://www.w3schools.com/browsers/browsers_stats.asp
--
Detecting if JavaScript is enabled is actually fairly straightforward.
No need to make it so complicated.
Well I think this thread is about how to detect if JS is enabled on the
Server-side ; ). Your method of course is the way to go if all one needs
is to display a msg to the user.
-- Felix
Didn't read the entire thread but appending parameters like this to an
url just doesn't seem right to me.
Maybe your problem can be solved by looking if the client sent a
X-Requested-With == 'XMLHttpRequest' header. That's how we in CakePHP
find out if a page was requested via Ajax or not ;
41 matches
Mail list logo