Hi,
Just wanted to note, that dynamic script elements are
not supported in Safari 2.0. Support for that was added
in Safari 2.01.
Hmm... It works in older versions of Safari. I just tested it in 1.2. Are
you saying the support was removed (or broken) in 2.0 and put back in with
2.01?
Hi,
The first time I saw line 1, I had no clue what it was doing. If all it's
doing is running some jquery before the page is loaded, there's _got_ to be
a more intuitive, succinct way to say it.
That is not, what it is doing. It calls the callback-function as soon as the
document is loaded
Hi,
window.frames[0].document.getElementsByTagName('head');
$('head',window.frames[0].document)
Christof
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Hi,
And for those lazy sods out there how about:
$.quickMethods({
bind: ['click'],
attr: ['val','href','title'],
css: ['display','height','width']
});
That is a really great idea :-) I think for something so usefull we should
chose a shorter Function-name:
$.fn.q =
Hi,
I like the idea of endAll(), but it won't help plugin developers:
To savely restore the state, you could do something like this (untested):
jQuery.fn.plugin = function() {
var oldStack = $.merge( [], this.stack );
// do other stuff
this.stack = oldStack;
return this;
};
I
Hi,
It's as if when the id selector is passed then the $ method just uses a
document.getElementById.
Well IDs are supposed to be unique throughout the entire document (i.e.
there can be one and only one element in the entire document with an ID of
myId), so why shouldn't it simply use
Hi,
Well, you might whant to work with an element only if it is inside
another one, which you already have:
Unfortnuately, getElementById exists only for the document object,
therefore you can't just say context.getElementById(...). I think this
is the reason why jQuery can't help you
Hi,
IDs are supposed to be unique per the spec. jQuery shouldn't have to
hack/deal with invalid markup.
jQuery has a context-parameter:
div id=IamAllreadyKnowndiv id=42asdf/div/div
$('#42',known) - should find one element
div id=IamAllreadyKnown/divdiv id=42asdf/div
$('#42',known) - should
Hi,
But as it is quite easy to solve this without IDs, we shouldn't bother
with a flawed workaround.
I have not yet been in a situation where I would have needed that, but it is a
question of least surprise. In case I would use a construct like
$('#myid',context), I would be very surprised
Hi,
has anyone measured the speed of unpacking jquery (or any other script, for
that matter)?
I would suspect that uncompressing/executing jquery.pack.js generates a
small time overhead, but how long does it take? Compared to the time
overhead of downloading the full-size jquery.js?
It
Hi,
Just putting in my vote for John's method. To me it makes sense, and would
mean I wouldn't have to keep track of numerous .end()s
You wouldn't nedd that with my aproach as well. Actually you could easily tell
if you need to call end() - simply by looking at the function name. With
Jhons
Hi,
I've submitted the XML serializer plugin to the wiki:
http://jquery.com/docs/Plugins/toXML/
Since Trac doesn't have a possibility to discuss such things before editing
the Webpage I'd like to post two other Variants here for discussion:
Simulate XMLSerializer globally and use it always
Hi,
The thing is, the main use case for a toXML() call is to send
XML data via an ajax request.
Well, I could imagine that there may be other usecases as well, like doing
search and replace operations on the string representation of a XML which is
reparsed afterwards. It was just a joke, but
Hi,
I don't know, I've been using .filter( foo, Function ) and .find(
foo, Function ) for a while now and I find them to be immensely
useful - especially considering that they're non-destructive.
Well, if it was destructive it would be more consistent. I don't think that it
would be a
Hi,
Quite interesting might be the leak pattern page at msdn:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ietechcol/
dnwebgen/ie_leak_patterns.asp
Does someone know of a similiar ressource for Firefox, or is finding
memory leaks here more by chance?
That link suggests
Hi,
[...]
.method( Hash, arg1, ..., argN, ContextFunction )
[...]
That all was not my point. My point was that it is irritating that the same
function may be destructive or not just by providing the context-function.
I'd vote for either never be destructive, or always. Since for functions
Hi,
Ok, apart from a different name, that is the same $else method. But what
happens if you do something like this:
$()
.filter()
.filter()
.doStuff()
.invert()
.doOtherStuff()
.invert()
doMoreStuff();
That is very simple: the second
Hi,
I like optimized code as much as the next guy... but brevity and
readability is KEY. the milliseconds that you can save using one
reasonable technique vs. another are not comparable to the seconds it
takes for an http request.
Is this about my suggestion to use for() instead of each()?
Hi,
i want to grab just the filename and extension from the following string:
str1=F:\\Test1\\Test2\\Test3\\test.txt;
i want to grab test.txt
i use this code:
file1=(str1.split(\\))[(str1.split(\\)).length-1];
i was wondering if there is a better way to grab that part of the string
Hi,
I wasn't claiming that for was any less great than each! I was
complaining about looping a concat vs. doing a join at t the end...
Erm, did I discuss that somewhere? You answered to my posting. The concat vs.
join stuff was Sam.
My point was to take the check for XMLSerializer out of the
Hi,
I've just released a brand new plug-in called quickSearch, for filter
large sets of data. Any comments, criticism (constructive, of course!)
and faults would be greatly received!
http://rikrikrik.com/jquery/quicksearch/
Very usefull. Some Ideas to improve this:
1. Create the input
Hi,
I'm attempting to get the href element for the first link it finds and then
set that as the url for the entire row's on-click event.
Do you mean something like this?
$.fn.tableHover = function(hoverClass) {
$(tr,this).click(function() {
window.location.href =
Hi,
I read this:
http://dean.edwards.name/weblog/2006/05/prototype-and-base/
and followed the link.
Christof
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Hi,
but new function() { ... }; is much cleaner, IMO. As far as I know,
that is the best way to have a local scope, [...]
We had that before. Deans way to create a local scope ((function() {...})())
is better, because it doesn't create a new Object that you never use. Of
course that
Hi,
John, I think there is one difference between both techniques.
While in
new function() {
}
the this keyword points the anonymous object itself, in
(function() {
...
})();
it does not. Right?
The first technique not only creates a new context but also the 'this'-Object.
Hi,
function RGBToHex(value)
{
var re = /\d+/g;
var matches = value.match(re);
var r = parseInt(matches[0]);
var g = parseInt(matches[1]);
var b = parseInt(matches[2]);
return # + r.toString(16) + g.toString(16) + b.toString(16);
}
function
Hi,
I'll publish it later on jquery.info with explanations, and probably a
nicer code, but you can get a first version here:
http://www.jquery.info/IMG/html/19_typewriter.html
Nice. You should handle the tags properly. The following Page contains a
typewriter that I have written in
Hi,
A regular expression is probably the best thing to use. This is nearly
working (but not quite)
Why not using DOM? It works perfectly. Just have a look at my code. Actually I
think, that it should be rather straight-forward to transform my code to use
jQuery.
The reason I think it
Hi,
Why not using DOM? [...]
It was just a suggestion on how the code could be improved (and a good
chance to work on my RegExp skills).
That is OK, but in production code I see no point in reeimplementing stuff
that you already have with DOM. It is fine while praticing.
Plus it involves
Hi,
As I work on GNU/Linux I use Konquere to see if things wil work in
Safari. I still need a mac but don't have one.
Now I notice that often things don't work under konquerer. For example
this simple line give nothing under konquerer while in IE and Firefox it
works fine.
$(li
Hi,
You could use a canvas element create one and import the image into it
and then roate that.
Pure javascript but not easily supported in all borwers... Ok IE.
Well in browsers without canvas you could look for data-url-support and if
that fails there is still the possibility of a java
Hi,
I'm not clicking on why the method for sending form data via ajax is like:
[{name:customerid, value:47}, {name:supplierid, value:32},
...]
As opposed to:
{customerid:47, supplierid:32, ...}
Can someone give me a clue?
There can be more than one field with the same name. PHP uses
Hi,
I'm not clicking on why the method for sending form data via ajax is
like:
[{name:customerid, value:47}, {name:supplierid,
value:32}, ...]
As opposed to:
{customerid:47, supplierid:32, ...}
Can someone give me a clue?
There can be more than one field with the same
Hi,
FONT face=Default Sans Serif,Verdana,Arial,Helvetica,sans-serif
size=2DIVI am getting the same error using load in IE.nbsp; The
alternative method you proposed corrected the problem.nbsp;
BRDIVBRMattnbsp;BRDIVBR/DIVFONT
color=#990099[EMAIL PROTECTED] wrote:
-BRBR/FONTBLOCKQUOTE
Hi,
Has anyone else had this problem? I would imagine it has to do with the
change of object properties ($.browser.msie) to methods ($.browser.msie()).
pretty shure.
@dave: I don't understand why you whant to use functions anyway here.
I suggest you simply use your private object as public
Hi,
I guess he needs something like this:
$(#link).hover(function() {
$(#navigation).each(function(){this.donthide = true;})
this.timeout = window.setTimeout(function()
{$(#navigation).show();},2000);
},
function() {
// if we move out of the link before the timout has
Hi,
a href=#some text/a
into this:
a href=#div class='someclass'some text/div/a
$([EMAIL PROTECTED]'#']).each(function() {
$(this)html('div class=someclass'+$(this).html+'/div');
});
Christof
___
jQuery mailing list
discuss@jquery.com
Hi,
var elem = $([EMAIL PROTECTED]'#']);
elem.html('div class=someclass' + elem.html() + '/div');
That is OK, if there is only one a element. In case the HTML-Body looks like
this:
a href=#1234/a
a href=#6789/a
You will get
a href=#div class=someclass1234/div/a
a href=#div
Hi,
As it stands the solution is having a var self =
this variable declared in the same function context as the event callback
closure is defined... but am I the only one who sees it as a bit way too
messy?
I guess so ;-) I don't think it is messy, actually it is very clear what
happens
Hi,
Essentially, anything that interacts with or manipulates the page must
be within the $(document).ready() function. This is considered a best
practice - the only alternative is to wrap your code in a
$(window).load( ... ), but that is highly un-optimal.
You could also put the script tag
Hi,
I had some time and used it to read through the current SVN-code searching for
possible improvements. My time was not enough to go through all the code, but
at least I could check jquery.js. I have some suggestions which you might
whant to evaluate.
I. each
---
This implementation is
Hi,
which discusses Dynamic Script Pattern or On-Demand Javascript. I think
this is a VERY cool feature. Does Jquery support something like this?
I wouldn't put it into jQuery itsself, because then you would need to load
jQuery before you can use the dynamic Script loading. I have developed
Hi,
For example, Christof's scriptloader could use jQ's ajax code, or could
merge with it.
That is something that won't happen. I whanted it to be as small as possible.
I felt that the JSAN core had to many functions that are not necessary for
the basic functionalitiy of resolving
Hi,
Can I use jQuery's xPath capability to locate an element in an arbitrary
XML file loaded using Ajax?
Yes:
$('/my/[EMAIL PROTECTED]',XMLDOMDocument)
Christof
___
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
Hi,
$.fn.newQuery = function()
{
var c = $();
c.cur = $.merge([], this.cur);
return c;
}
I don't like the name. Maybe copy states better what the function does.
Have you tried this kind of implementaiton:
$.fn.copy = function() {return $(this.get());};
I don't know if
Hi,
If I remember correctly, Firefox has an issue with opacity at '1' - I
guess I assumed that it was the case in more browsers. I'll add
another catch in to fix it (sigh)
Have you ever thought about using deans object-Detection-tip for things like
this:
Hi,
I'd like to take this opportunity to announce the brand new jQuery
1.0! A lot of work has gone into this release. A lot of bugs fixed, a
ton of new features, and a complete overhaul of how the jQuery
development process is run.
This is great. Before I have found JQuery I have read the
Hi,
var $jQ = $(div);
for(var i=0; i $jQ.length; i++) {
alert(i + ':' + $jQ[i]);
}
He wants to sort the Array. That is IIRC not possible with the jQuery-Object
itsself.
Christof
___
jQuery mailing list
discuss@jquery.com
Hi,
OK, how about:
var arr = $(li).toString().split(',');
How can that work with DOM Objects?
1. I can not find toString() in jQuery. I guess it will return something
like [object].
2. Splitting a string creates an array of strings, not an array of DOM nodes.
Christof
Hi,
2. Splitting a string creates an array of strings, not an array of DOM
nodes.
I know, i thought you wanted to sort the array? :)
Well, an Array can be sorted by any criteria you like.
Anyway the original solution to Klaus' Problem is a lot easier and was one of
the first answers to
Hi,
Frankly, I think a better solution for jQuery is to become its own
repository. :-) Provide svn space for contrib modules, under a common
MIT/GPL dual license, automate the documentation, make it easy to mix and
match. Right now there's just so many cool things being announced on the
Hi,
It would be nice if there was a JQuery Plugin for handling Styles. I found
a script that is made to change styles (such as to stylesheets).
Here it is:http://developer.apple.com/internet/webcontent/styles.html
Hopefully someone will be able to turn it into a JQuery Plugin
It would be
101 - 152 of 152 matches
Mail list logo