Re: [jQuery] Is there a way to dynamically load jquery plugins

2006-10-23 Thread Christof Donat
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?

Re: [jQuery] jQuery API discussion

2006-10-18 Thread Christof Donat
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

Re: [jQuery] frames/iframes syntax?

2006-10-17 Thread Christof Donat
Hi, window.frames[0].document.getElementsByTagName('head'); $('head',window.frames[0].document) Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] jQuery API discussion

2006-10-16 Thread Christof Donat
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 =

Re: [jQuery] Is there a way to endAll()?

2006-10-14 Thread Christof Donat
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

Re: [jQuery] Performance question

2006-10-10 Thread Christof Donat
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

Re: [jQuery] Performance question

2006-10-10 Thread Christof Donat
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

Re: [jQuery] Performance question

2006-10-10 Thread Christof Donat
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

Re: [jQuery] Performance question

2006-10-10 Thread Christof Donat
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

Re: [jQuery] pack speed

2006-10-09 Thread Christof Donat
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

Re: [jQuery] Chainable if/else - hot or not?

2006-10-05 Thread Christof Donat
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

Re: [jQuery] New plugin: toXML (XML serializer)

2006-10-05 Thread Christof Donat
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

Re: [jQuery] New plugin: toXML (XML serializer)

2006-10-05 Thread Christof Donat
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

Re: [jQuery] Chainable if/else - hot or not?

2006-10-03 Thread Christof Donat
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

Re: [jQuery] For Brandon Aaron

2006-10-03 Thread Christof Donat
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

Re: [jQuery] Chainable if/else - hot or not?

2006-10-03 Thread Christof Donat
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

Re: [jQuery] Chainable if/else - hot or not?

2006-10-03 Thread Christof Donat
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

Re: [jQuery] Serializing XML

2006-10-03 Thread Christof Donat
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()?

Re: [jQuery] String Parsing

2006-10-03 Thread Christof Donat
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

Re: [jQuery] Serializing XML

2006-10-03 Thread Christof Donat
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

Re: [jQuery] New plug-in: quickSearch

2006-10-02 Thread Christof Donat
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

Re: [jQuery] Passing current object to function

2006-09-30 Thread Christof Donat
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 =

Re: [jQuery] When / how did you find out about jQuery?

2006-09-27 Thread Christof Donat
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/

Re: [jQuery] interesting syntax

2006-09-27 Thread Christof Donat
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

Re: [jQuery] interesting syntax

2006-09-27 Thread Christof Donat
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.

Re: [jQuery] Bug in .color() / Firefox

2006-09-21 Thread Christof Donat
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

Re: [jQuery] typewriter effect

2006-09-18 Thread Christof Donat
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

Re: [jQuery] typewriter effect

2006-09-18 Thread Christof Donat
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

Re: [jQuery] typewriter effect

2006-09-18 Thread Christof Donat
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

Re: [jQuery] konquerer, safari

2006-09-17 Thread Christof Donat
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

Re: [jQuery] spin 360°

2006-09-15 Thread Christof Donat
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

Re: [jQuery] Sending array vs object

2006-09-14 Thread Christof Donat
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

Re: [jQuery] Sending array vs object

2006-09-14 Thread Christof Donat
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

Re: [jQuery] Bug?

2006-09-13 Thread Christof Donat
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

Re: [jQuery] jQBrowser 0.2 woes

2006-09-13 Thread Christof Donat
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

Re: [jQuery] code ideas: if mouseover for 5 seconds then do this else do nothi ng

2006-09-13 Thread Christof Donat
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

Re: [jQuery] inside A

2006-09-12 Thread Christof Donat
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

Re: [jQuery] inside A

2006-09-12 Thread Christof Donat
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

Re: [jQuery] Preserving context within closure

2006-09-11 Thread Christof Donat
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

Re: [jQuery] JQuery Best Practices

2006-09-09 Thread Christof Donat
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

[jQuery] Suggesting some improvements

2006-09-06 Thread Christof Donat
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

Re: [jQuery] On-Demand Javascript?

2006-09-05 Thread Christof Donat
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

Re: [jQuery] On-Demand Javascript?

2006-09-05 Thread Christof Donat
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

Re: [jQuery] xPath

2006-09-03 Thread Christof Donat
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/

Re: [jQuery] jQuery copy constructor

2006-08-29 Thread Christof Donat
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

Re: [jQuery] Distorted fonts (in Opera) with opacity = 0.9999

2006-08-29 Thread Christof Donat
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:

Re: [jQuery] jQuery 1.0

2006-08-26 Thread Christof Donat
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

Re: [jQuery] jQuery.toArray() ?

2006-08-24 Thread Christof Donat
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

Re: [jQuery] jQuery.toArray() ?

2006-08-24 Thread Christof Donat
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

Re: [jQuery] jQuery.toArray() ?

2006-08-24 Thread Christof Donat
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

Re: [jQuery] jQuery and openjsan.org

2006-08-22 Thread Christof Donat
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

Re: [jQuery] CSS Style Plugin Idea

2006-08-11 Thread Christof Donat
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

<    1   2