Just a little fun for Halloween 2009.
I carved my pumpkin this year as the jQuery logo. I hope some in this
group can appreciate it! :)
http://mattkruse.com/2009/10/31/jquery-pumpkin/
Matt Kruse
is overly
slow, perhaps someone can identify other issues contributing to the
performance problem.
Matt Kruse
').attr('checked', $
('#msgCheckAllInbox').is(':checked'));
function checkAllMsgsIn(cb) {
$('#msgsInbox input.messageCheckbox').attr('checked', cb.checked);
}
Much simpler.
Matt Kruse
use pure CSS?
Matt Kruse
On Sep 2, 1:16 pm, msoliver michaelsoli...@gmail.com wrote:
if ($.isFunction(openerFunc))
Why not just:
if (openerFunc openerFunc.call)
?
Matt Kruse
by doing:
if (openerFunc typeof openerFunc.call=='function')
Matt Kruse
.
Then why does the example work in IE8 using jQuery 1.2.1?
You can certainly set a tr to display:none in IE.
Matt Kruse
.
What version of jQuery? What version of IE? Have you looked at your js
errors?
Create a page with _only_ jQuery in it, load it in your IE, and see if
it cases an error.
Matt Kruse
base_url();?js/
jquery.js type=application/x-javascript alert('jQuery not
loaded');/script
Matt Kruse
it alert?
Make sure IE's settings are such that errors will be shown.
Matt Kruse
On Jul 9, 3:27 pm, Paulodemoc paulode...@gmail.com wrote:
The generated code is
script language=javascript src=http://servidor/astral/web/js/
jquery.js type=application/x-javascript /script
I tryied to add
that I can then have jQuery
use this, to get values from it? Or is there no sense in trying to
use jQuery for this, and it might not even be of help?
Why would you want to use jQuery to handle a standard javascript
object?
What exactly do you want to do with it?
Matt Kruse
) {
if (typeof fn=='string') { fn = new Function(fn); }
this.each(fn);
}
Then:
$(':checkbox.chkEvent').run(this.checked = !this.checked);
Whether that's actually more efficient to write depends on the
situation ;)
Matt Kruse
a function to be available outside of the function scope
that is currently executing, then define it outside.
Matt Kruse
/bestpractices/#onclick
You could do:
a onclick=ajax_loadpage(inittabFeeds);return false;bababa/a
function ajax_loadpage(func) {
func();
}
Matt Kruse
like:
Click here to show all items
and it will just toggle the word show to hide.
Hope it's useful.
Matt Kruse
should really have .prop() which would work like attr() usually
intends to, but deal only with DOM properties rather than trying to
manipulate actual attributes. Script authors usually want to deal with
properties anyway, and attr() only makes it confusing.
Matt Kruse
nothing, since you would need funcname1() to actually
run the function.
Or preferrably: setTimeout(funcname1,1000);
Matt Kruse
On Jun 9, 9:35 am, simon si...@uvfx.tv wrote:
$.myvariable1
$.myvariable3
$.myvariable2
now I would like to add the number part of the variable to it
dynamically.
var i=1;
$['myvariable'+i] === $.myvariable1
See: http://www.javascripttoolbox.com/bestpractices/#squarebracket
Matt Kruse
popularity of the different frameworks. There is always
some safety in choosing the market leader and if you are going in
blind with no desire to do an in-depth analysis of each option, then
choosing jQuery would probably be your safest best.
IMO,
Matt Kruse
On May 21, 2:05 pm, kiusau kiu...@mac.com
You should post a simple test case, because the simple test case I
created does not show this problem.
Matt Kruse
On May 19, 9:33 am, asrij...@googlemail.com
asrij...@googlemail.com wrote:
Hi Guys,
just started to upgrade my site jquery version to the latest, now I'm
facing some strange
On May 14, 5:17 am, sebastien creme sebastien.cr...@gmail.com wrote:
Dynamic colspan setted via style property seems not work on IE.
For some reason, jQuery currently maps rowspan-rowSpan, but not
colspan-colSpan.
http://dev.jquery.com/ticket/4397
Matt Kruse
I've updated my previous cheat sheet to be in line with jQuery 1.3.2.
I think it's more useful than other cheat sheets that simply dump
method names, but hey, that's personal preference ;)
http://www.javascripttoolbox.com/jquery/cheatsheet/
Enjoy
Matt Kruse
understand what is going on.
Matt Kruse
is in its prototype object.
Hope that helps,
Matt Kruse
fine and would seem cleaner.
Any other questions? :)
Matt Kruse
testing yet, so this really is an alpha
kind of release.
If you have any feedback, please let me know so I can fancy it up for
it's final release!
Matt Kruse
()
http://groups.google.com/group/jquery-dev/browse_frm/thread/be468dd3344f5f26/d340a8799e416615
Matt Kruse
this: http://plugins.jquery.com/project/Plugins/date
Getting this page as RSS would be fantastic.
Matt Kruse
On Apr 21, 4:09 pm, Karl Swedberg k...@englishrules.com wrote:
Here you go:
http://plugins.jquery.com/latest_releases/feed
Cool, is this new, or did I just not find it when I looked?
I'd like to see more items in the feed, too. So it would hopefully
reach back 3-5 days at least.
Matt Kruse
(){
if (!this.id) this.id = this.rel;
});
Of course, it would probably be better to avoid this altogether and
use the rel attribute to make selections to begin with.
Matt Kruse
://www.javascripttoolbox.com/lib/floatingheader/
Hope that helps,
Matt Kruse
(), and avoid the find()
calls by using native DOM methods if this doesn't offer any speed-up.
Matt Kruse
and other factors is something you have to consider
yourself.
Matt Kruse
and tbody for your content.
You can email me privately if it still doesn't work after fixing that.
Matt Kruse
++) {
if (this[i]!==compareTo[i]) {
return false;
}
}
return true;
}
$('#home').equals( $('#home') ); // True!
Matt Kruse
consider this to be semantics, but it's important. :)
Matt Kruse
= obj.defaultChecked;
}
...
}
Matt Kruse
any one
of many discussions on the web on this topic.
Matt Kruse
, not ID or NAME.
http://lmgtfy.com/?q=name+attribute+cdata+id+token
;)
Matt Kruse
to check the browser would benefit
from reading more about feature detection and why it is almost always
a better strategy. It just doesn't come naturally at first for many,
and you might struggle through some yeah, BUT! moments, but in the
end you'll be better off.
Matt Kruse
.
Matt Kruse
when implemting jQuery, and
it would be great if there were some better models and guidelines for
plugin development that would make the end results better for
everyone.
Matt Kruse
.
It's just a minor quibble anyway. It's similar to lines like this in
the jquery source:
if ( typeof text !== object text != null )
Fixing things like this would tighten and improve the code a bit, IMO.
Matt Kruse
of questions. It seems
to have been written by someone with very limited javascript
knowledge. The fact that they mistake closures for enclosures and
call the topic super-impressive would cause me to run away
immediately.
Matt Kruse
for me, both in IE6 and FF3.
And I don't see why it wouldn't change.
How are you testing it?
Matt Kruse
the CSS is straight-forward
and documented.
There are many examples showing off lots of the functionality here.
The best way to see what this plugin can do is to try it out!
http://www.javascripttoolbox.com/lib/contextmenu/
I hope it is useful to some of you. Feedback is of course appreciated.
Matt
if the item to be matched is contained within the
results. This would be slow in some cases, for sure, but would
probably behave as many people expect. It seems like the behavior
of .is() confuses a lot of people when they first use it (myself
included).
Matt Kruse
, but I think that a lot of people
might find it useful.
I welcome any feedback! Thanks!
Matt Kruse
If you've used jQuery on other pages, then it's very likely that the
js has been cached in the user's browser anyway. Loading it again
should not affect load times in most cases.
Matt Kruse
On Sep 18, 3:50 pm, Alex Weber [EMAIL PROTECTED] wrote:
That's possibly the smartest thing I've heard
that helps,
Matt Kruse
() is called, it returns the internal height,
minus borders and padding.
When height(val) is called, the height includes borders and padding.
I believe these should behave consistently in quirks mode. In
standards mode they work fine.
For now I will write a fix that switches based on compatMode.
Matt Kruse
/browse_thread/thread/c39f52b6c5d1feac
This is my way of handling event delegation on elements which may have
child elements that get the actual event.
Matt Kruse
on
hierarchy could be used. I'm not sure what impact this would have on
speed.
Matt Kruse
work correctly regardless of doctype as
well. IMO :)
Matt
On Sep 17, 5:49 pm, ricardobeat [EMAIL PROTECTED] wrote:
There is a reason it's called Quirks mode :)
On Sep 17, 2:26 pm, Matt Kruse [EMAIL PROTECTED] wrote:
In IE6, quirks mode, I expect this to not change their height of an
object
();
}
});
}
})
})(jQuery);
Matt Kruse
.
Matt Kruse
at some point, IMO, and
it's better to be ahead of the curve than playing catch-up.
Matt Kruse
);
console.log(i:+i);
});
}
for (var i = 1; i totalPages + 1; i++) {
$(#pages_panel).append($(span + i + /span)
.click( getClickFunc(i) );
}
(careful, above not tested and is highly subject to typos. But the
concept should be clear)
Matt Kruse
://www.javascripttoolbox.com/lib/selectbox/jquery.php
Matt Kruse
has some advantages over the
link above and could be easily made into a jQuery plugin with a small
amount of effort:
http://www.javascripttoolbox.com/lib/selectbox/
Matt Kruse
and is what we generally use. I considered releasing
it, but thought that another hack-of-a-hack-of-a-hack plugin would
just add more confusion. :)
Matt Kruse
into small pieces for this reason, IMO. With browser scripting,
you can never be certain that you have considered everything a user
may want to do. Making it easier to override specific pieces of logic
is a good thing.
Thanks,
Matt Kruse
, it's just an immediate execution of an
anonymous function (which can also be used to create a closure).
Second, I can't think of any reason to do that over just using 5px
as the value :)
Matt Kruse
;
//var $e = full ? $() : $(el).find('a,:input');
//$.each(['mousedown','mouseup','keydown','keypress','click'],
function(i,o) {
//$e[b?'bind':'unbind'](o, $.blockUI.impl.handler);
//});
}
Matt Kruse
do:
$('#something')[0].tagName
?
Matt Kruse
the opposite to be true.
If you change an element's class in IE, the resulting re-flow of the
document can be very slow.
For things like changing styles on hover, I always directly manipulate
the style of the object rather than change the class, since class
changing introduces a noticeable lag in IE.
Matt
) { ... }
Is there a better way?
Matt Kruse
alternative (=v1.2) could be...
o.filter(function(){return !$(this).parent().is('unwantedclass');});
True, but I'm needing to checking for the class on any element in the
parent chain, not just the immediate parent. So I guess the way I'm
doing it will suffice. Thanks for your help!
Matt Kruse
calling blockUI you can use the same element over and over as shown in the
last example on this page:
Does the example create a memory leak pattern via the circular
reference? I haven't checked it with drip, but it looks to me like a
leak scenario.
Matt Kruse
the domain to anyone who
builds a working tool similar to what I was thinking of, which it
sounds like you are.
Matt Kruse
of the sniffing that exists in
jQuery already is unnecessary.
Matt Kruse
sniffing. Or are there other reasons that I'm not aware of?
Matt Kruse
you've limited it to only safari?
Fixing browser-specific bugs using browser sniffing is highly suspect
and almost never necessary. In almost all cases, the bug/quirk can be
fixed in the general case without any check for browser.
Matt Kruse
when I get a chance, but I thought I would post a
message now in case anyone else is having a similar problem.
Of course, it could be my own problem somewhere, but I'll try to rule
that out ;)
Matt Kruse
an updated
package and I'd know I couldn't update yet. I'd love to build it if
only I had 2 spare seconds in life ;)
Matt Kruse
instead if you needed to.
Matt Kruse
.
The cascade of side-effects is enormous.
I don't see any side-effect at all, but I may of course be wrong ;)
Matt Kruse
, so there is no performance hit. And this would
be the case in the change I suggested.
Matt Kruse
thing
with wait() - it would eat up the following commands so that a
setTimeout() could be called and execution could continue when the
pause was done. The end result was some kind of slick-looking code in
some places. But more of a mental exercise than anything extremely
practical ;)
Matt Kruse
and enhancements.
If anyone thinks this is a good idea and wants to develop this kind of
functionality, I'd be willing to point or transfer the domain to a
site that offers this kind of service.
Matt Kruse
that .is() is the correct way to do it. It makes jQuery a
little more approachable and user-friendly if it has exactly what
you're looking for and expect, even though it may just be a wrapper
for the real underlying functionality.
Matt Kruse
to use plugins, the look and feel/API of jQuery
to them will in large part be that of the plugins they choose, which
leaves jQuery's fate up to random developers creating random plugins.
Not so good, IMO.
Matt Kruse
Specificity is a big reason to use id's. You can make a rule using
#id { ... }
and know that it will take precedence over all your tag/class-based
rules.
Matt Kruse
and each'ing or whatever and then calls this underlying method on the
object's className attribute directly.
Is there any reason why it's not done this way? Perhaps there are
things I'm not thinking of :)
Matt Kruse
it work correctly, but IMO it is worth
it.
Matt Kruse
One approach would be to put connected rows in separate tbody tags,
then sort the tbody objects based on the first tr in the tbody.
This would be a specialized way of sorting, though, and you would
probably need to write some custom code to accomplish it.
Matt Kruse
On Apr 13, 12:53 pm, Chris
may also be display:none which
would cause it to be hidden as well, and those tags are not parents of
the cell itself. Checking the cell's current 'display' value will of
course get me nowhere.
I've begun writing logic to handle this case, but it would be great if
someone has already done it!
Matt
I am trying to finish up my table sorting/paging/filtering plugin
here:
http://www.JavascriptToolbox.com/lib/table/
(been trying to finish it up for a while... sick kids don't mix well
with javascript development free time...)
It works fine with sorting, filtering, and paging all on the same
88 matches
Mail list logo