Re: [jQuery] Any regular expression gurus here?

2007-03-29 Thread Christof Donat
Hi, The regular expression below works on just about everything except nested parentheses: Regular Expressions are used to define regular (Type 3 in Chomsky Hirarchy) grammars. You can not express nested parentheses in regular grammar, you need a context free (Type 2) but not regular

Re: [jQuery] Custome selectors use : as seperator, which is an official character for id's

2007-03-09 Thread Christof Donat
Hi, $('[EMAIL PROTECTED]my:elem]') I guess, that that does not use getElementById() and thus is a lot slower than $('#my:elem'). I guess, that JSF might also have Problems with CSS, becaue there you use stuff like #my:hover, etc. To make the patch to jQuery as small as possible and let most

Re: [jQuery] iterating over child elements

2007-03-05 Thread Christof Donat
Hi, If I find a DIV, through a call var parentDiv = $(this).parents(div:first); How do I iterate over the child elements of what I found? Better yet, is there a way to print out the child elements and their ID's in one fell swoop? parentDiv.children().each(function() { var t =

Re: [jQuery] JS Source code Formatter - Anyone know of any good ones

2007-02-28 Thread Christof Donat
Hi, Chili, based on jquery http://www.mondotondo.com/aercolino/noteslog/?page_id=79 I think, He is looking for something like indent for javaScript. Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] jQuery in server side language?

2007-02-24 Thread Christof Donat
Hi, it would be a great tool for html parsing, e.g. how can I get the google search results by parsing the html? as easy as that... jQuery(a.l).each(function(){ console.debug( this.href ); }); Maybe this Link can help you:

Re: [jQuery] Why isn't my Ajax call working?

2007-02-16 Thread Christof Donat
Hi, var html = $.ajax({ type: POST, url: get_file_contents.php, data: mod_index= + p_moduleIndex, dataType: html, error: function(req, errorMsg) { alert(An error occurred: + errorMsg); } }).responseText; $.ajax() does an _assynchronous_

Re: [jQuery] Checking for a class?

2007-02-11 Thread Christof Donat
Hi, You could also use one of the attribute selectors to filter a set of matched elements. If you don't care where the particular value appears within the class attribute, you could do this: $('[EMAIL PROTECTED]') Why not simply this $('#id.someClass') Christof

Re: [jQuery] Problem with IE (Ajax + XML fragments)

2007-02-09 Thread Christof Donat
Hi, Expected Result: The div element should be append by a spanTest/span element. Firefox: OK IE 6: not OK (the Ajax request will return an error). The error is produced in the .append command. Your span Element belongs to another DOM-document than your div. In that case jQuery should clone

Re: [jQuery] Problem with IE (Ajax + XML fragments)

2007-02-09 Thread Christof Donat
Hi, I thought the .html() function does not work on XML documents. Your example does not work either. That is true, but there seems to be no other simple way do transfer some content from one document to another with IE. You really need to copy the nodes to get that: jQuery.fn.copyAppend =

Re: [jQuery] IE PNG hack

2007-02-04 Thread Christof Donat
Hi, I've wrote very simple JQuery IE PNG hack plugin. Would like to know your professional opinion, to make it better Great idea. Generally you can set the filter for the img tag as well, you just need a fully transparent gif (or png) for the src. jQuery.fn.IEPNGHack = function() {

Re: [jQuery] IE PNG hack

2007-02-04 Thread Christof Donat
Hi, Sorry, I forgot something: Without background: jQuery.fn.IEPNGHack = function() { if (!$.browser.msie) return this; return this.each(function() { [...] }); }; With background: jQuery.fn.IEPNGHack = function() { if (!$.browser.msie) return

Re: [jQuery] Timer

2007-02-02 Thread Christof Donat
Hi, über load() blende ich eine Datei innerhalb einer PHP-Seite ein. Diesen eingebundenen Bereich würde ich gerne alle 30 Sekunden aktualisieren. Die Mailingliste ist in englisch. Deshalb bitte in Zukunft englisch. Dann können auch diejenigen Antworten, die der deutschen Sprache nicht mächtig

Re: [jQuery] Timer

2007-02-02 Thread Christof Donat
Hi, Christof Donat wrote: $(function() { var loadMyContent = function() { $('loadItHere').load('/content/url.xml'); } setTimeout(loadMyContent,3); loadMyContent(); }) I tried your code from above. But I have a problem with it. When the page loads

Re: [jQuery] Really Ugly?

2007-02-01 Thread Christof Donat
Hi, Hence 7 lines instead of 4. Nope. Without a DOM-builder plugin I would write this $('#show-alert').click(function() { var oDIV = document.createElement('div'); oDiv.className = 'quick-alert'; oText = document.createTextNode(Alert! Watch me before it's too late!);

Re: [jQuery] Why won't this code work?

2007-01-25 Thread Christof Donat
Hi, $(document).ready(function() { // hides the slickbox as soon as the DOM is ready // (a little sooner than page load) $('#slickbox').hide(); }); // toggles the slickbox on clicking the noted link $('a#slick-toggle').click(function() { $('#slickbox').toggle(400);

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-22 Thread Christof Donat
Hi, Maybe it has to do with your security-setings in IE. You need to allow scripts to access secure ActiveX-Controls, as you need for all ajax stuff. Otherwise there will of course not be any chance to get an XMLHttpRequest object. But that cannot be the case because I tested

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-18 Thread Christof Donat
Hi, I'm getting something similar in IE7 as well (FF and Opera seem fine). A View Source reveals this: script id=__ie_init defer=true src=//:/script Hm, that is nothing that could have been created with jsPax. I don't use deferred scripts and there is no __ie_init anywhere in jsPax as well.

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-18 Thread Christof Donat
Hi, Maybe it has to do with your security-setings in IE. You need to allow scripts to access secure ActiveX-Controls, as you need for all ajax stuff. Otherwise there will of course not be any chance to get an XMLHttpRequest object. But that cannot be the case because I tested your

Re: [jQuery] Remote Scripts

2007-01-18 Thread Christof Donat
Hi, Am I missing something or is there no jQuery way to load remote javascript? Looks like $.getScript() uses XHR, so it doesn't work. Why does that not work? Do you have Problems with XMLHttpRequests? You can create a script tag using DOM, set its src attribute and insert it into the DOM

Re: [jQuery] Proper OOP paradigm using jquery - examples for $.extend() ?

2007-01-17 Thread Christof Donat
Hi, var myObject = new myDerivedClass(37); sorry, this should be var myObject = new femalePatient(37); of course. alert(myObject.age); // alerts 42 alert(myObject.shoesize); // alerts 37 Christof ___ jQuery mailing list discuss@jquery.com

Re: [jQuery] Proper OOP paradigm

2007-01-17 Thread Christof Donat
Hi, Sorry, still not right. Any impementation of femalePatient that does not use Math.random for logic is flawed. OK. function Patient(age) { this.getAge = function() { return age; }; this.setAge = function(newage) { age = newage; }; this.and = function(first,second) {

Re: [jQuery] Proper OOP paradigm

2007-01-17 Thread Christof Donat
Hi, Of course my code was ineficient. Here we go: femalePatient = ( $user == 'Dan' ) ? function(shoesize) {         femalePatientBase.apply(this,[shoesize]); var oldgetage = this.getAge; this.getAge = function() { var a = oldgetage.apply(this,[]);

Re: [jQuery] Proper OOP paradigm / please be friendly

2007-01-17 Thread Christof Donat
Hi, as you probably have noticed, there is an abysmal proportion of 1% of women in Open Source (compared to 10% in commercial software development). We need to think about how we communicate if we want to help this change. Please be friendly and try not to antagonize people who could be

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-16 Thread Christof Donat
Hi, But I still have the same problem... Here is a zip file. After unzipping, there will be a new chili folder with a test page and a subfolder. It works in FF1.5.0.9 but does not in IE7. http://www.nabble.com/file/5620/chili.zip chili.zip Currrently I don't have IE7 at hand - on monday

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-16 Thread Christof Donat
Hi, I have no problems with a relative package path This is very strange... Did you use the exact files/directories in the zip I submitted? Yes, I just changed packageBase to the path at my computer. Everything else is exactly the files in the zip. Maybe it has to do with your

Re: [jQuery] Proper OOP paradigm using jquery - examples for $.extend() ?

2007-01-16 Thread Christof Donat
Hi, I'm trying to understand the use of OOP with jQuery. In creating a fairly complex web application I have made extensive use of the class attribute. Further, I've been successful in binding events to the classes, setting styles, and that sort of thing. What I have not had much

Re: [jQuery] Can this be written better (newbie alert)

2007-01-13 Thread Christof Donat
Hi, This fails Your parentheses are wrong. I just reformated your code and here is the result: $(document).ready(function() { $('#getTags').click(function() { $('#taglist').load('http://tarique.sanisoft.com/cheesecake/tags/taglist', function() { $('a.taglink').click(tagSelect);

Re: [jQuery] Can this be written better (newbie alert)

2007-01-13 Thread Christof Donat
Hi, My problem now is how to get the value of text which is between a /a of the clicked link, - now the scope of $(this) is different. In the first case it work because $(this) was [a.taglink cheeseCake...] but with the above $(this) becomes [Window addphoto.html] Hm, this sounds strange.

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-13 Thread Christof Donat
Hi, Your test page works now :-) Great :-) But I still have the same problem... Here is a zip file. After unzipping, there will be a new chili folder with a test page and a subfolder. It works in FF1.5.0.9 but does not in IE7. http://www.nabble.com/file/5620/chili.zip chili.zip

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-12 Thread Christof Donat
Hi, Just a guess: Have you tried to use an absolute URL, or at leas an absolute path here? Maybe Firefox interprets that relative to the current HTML page and IE interprets it relative to the js. Then IE tries to load packages/packages/jquery.js where Firefox loads packages/jquery.js.

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-12 Thread Christof Donat
Hi, Which testsuite? What URL? Look at http://www.jspax.org/test/ Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-12 Thread Christof Donat
Hi, http://www.jspax.org/test/ FF, OK. IE, KO: Hm, It workes for me. I'll see if I can find something strange around the point, the error message suggests. Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-12 Thread Christof Donat
Hi, http://www.jspax.org/test/ FF, OK. IE, KO: Hm, It workes for me. I'll see if I can find something strange around the point, the error message suggests. Christof For me on IE 6 it pops up a message saying This page is accessing information that is not under its control.

Re: [jQuery] domain redirection vs same content - Was: dynamic loading of jquery.js into my web page

2007-01-12 Thread Christof Donat
Hi, I know this is completely off topic (and I apologize for it), but, IIRC, it's really bad for SEO (Search Engine Optimization) to have identical content at multiple URLs because then they begin competing with each other for rankings. Unless each domain has a separate purpose, (like mirrors

Re: [jQuery] Can this be written better (newbie alert)

2007-01-12 Thread Christof Donat
Hi, Just about getting feet wet with jQuery, wrote a simple function which fills an input field with text of the link clicked after sorting the comma separated values. It is working as expected but would like to know if it can be made more comprehensive. Your code is really good for a jQuery

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-11 Thread Christof Donat
Hi, Yes, I downloaded it short before. Please, tell me when I can download the fixed version, and I'll test again I just have uploaded the current version again. Please try again. I've just downloaded and tried again but... nothing changed :( Have you tried the testsuite that I have

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-11 Thread Christof Donat
Hi, 2.I've wrapped the content of the standard chili.js file inside this: $using( 'jquery', function() { ... $package( 'chili', {} ); } ); Since you don't load chili.js via jsPax you don't necessarily need the $package()-call, but it doesn't hurt. 3.I've

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-06 Thread Christof Donat
Hi, Yes, I downloaded it short before. Please, tell me when I can download the fixed version, and I'll test again I just have uploaded the current version again. Please try again. Christof ___ jQuery mailing list discuss@jquery.com

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-04 Thread Christof Donat
Hi, I'm afraid that I simply don't take Safari users into account. Hardly a great thing, but I focus on three browsers: Firefox and IE7, and then IE6. In that order. The work I do is targetted at corporate users who run Windows 2000 and Firefox, and all the JS work I do is for those users.

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-04 Thread Christof Donat
Hi, That looks really dodgy, sorry. What if the browser downloads script and script2 at the same time, and script2 finishes first? It doesn't. script2 is not downloaded at all, it is like a inline script. As you might know scripts are evaluated in the order they are in the HTML code, that

Re: [jQuery] Dynamically removing an inline script block

2007-01-04 Thread Christof Donat
Hi, I'm seeking help in dynamically REMOVING an inline script block within the head tags. I guess you whant to remove values in a variable. You should not do that by removing script-tags, because that does not remove the variables in it. Send your data as JSON and write a refresh function

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-04 Thread Christof Donat
Hi, As you might know scripts are evaluated in the order they are in the HTML code, that is that script will be evaluated before script2 is. Interesting - is that guaranteed even when the scripts are added dynamically? Well, I don't know about any guarantees, but it works in all test I

Re: [jQuery] dynamic loading of jquery.js into my web page

2007-01-03 Thread Christof Donat
Hi, function addScript( url ) { var script = document.createElement( 'script' ); script.type = 'text/javascript'; script.charset = 'utf-8'; script.src = url; document.getElementsByTagName('head')[0].appendChild( script ); }; There are safari-versions

Re: [jQuery] dynamic plugin loading

2006-12-28 Thread Christof Donat
Hi, I'm trying to develope a small piece for dynamic loading in jquery, wich loads the .js and .css source files on the fly without any special markup in the html page. For .js files you can use jspax (www.jspax.org). I use it to load jQuery and plugins on demand (actually I made it for that

Re: [jQuery] dynamic plugin loading

2006-12-28 Thread Christof Donat
Hi, function addScript( url, doc ) { doc = doc || document; var script = doc.createElement( 'script' ); script.type = 'text/javascript'; script.charset = 'utf-8'; script.src = url; doc.getElementsByTagName('head')[0].appendChild( script

Re: [jQuery] jQuery heat maps

2006-12-22 Thread Christof Donat
Hi, Would it be possible to aggregate this data client side, and then every X seconds or clicks? Can we store state across page refreshes? Look here: http://verens.com/archives/2006/08/29/kaejax/ In the case of Heat Maps it might also be acceptable to send the data as a Bulk on unload. var

Re: [jQuery] Fast way to remove duplicate array entries?

2006-12-20 Thread Christof Donat
Hi, Anyone know of a fast way to remove dups in an array? Is the array sorted? Then you can do function arrayUniq(a) { var rval = [a[0]]; var o = a[0]; for( var i = 1; i a.length; i++ ) if( a[i] != o ) { rval.push(a[i]); o = a[i];

Re: [jQuery] Fast way to remove duplicate array entries?

2006-12-20 Thread Christof Donat
Hi, Anyone know of a fast way to remove dups in an array? The Perl way to do this is to convert the array entries into hash keys and then extract the keys back into an array. This is faster than searching the array and it should work with javascript. The speed of such solutions very much

Re: [jQuery] More DOM Query Speed Tests

2006-12-19 Thread Christof Donat
Hi, ID should be uniqe over the page, so div#myid is redundant. No, it isn't. It should return an empty jQuery-Object in case the Element with the id myid is not a div. That is usefull when you produce your Content dynamically (e.g. with PHP). The same is true for .myclass#myid, or even

Re: [jQuery] (no subject)

2006-12-19 Thread Christof Donat
Hi $(function(){ $(.y).ready(function() { var today = new Date(); var year = today.getFullYear(); document.write(year); }); }); $(function() { $('.y').html((new Date()).getFullYear()); }); Christof ___ jQuery mailing list

Re: [jQuery] More DOM Query Speed Tests

2006-12-19 Thread Christof Donat
Hi, ID should be uniqe over the page, so div#myid is redundant. [...] I know that. My point is that there should not be two elements with same id on the page. At least, I'm developing like that. But that doesn't make the expression div#myid redundant. Of course the id should be unique,

Re: [jQuery] More DOM Query Speed Tests

2006-12-19 Thread Christof Donat
Hi, I think what Christof is getting at is this: [...] Yes, exactly. Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] More DOM Query Speed Tests

2006-12-19 Thread Christof Donat
Hi, If you want to keep performance, maybe it's better to do: if( $(#myid).is('div.myclass')) alert(YEAH, WE GOT IT); else alert(Ha, my ID is misused!!); Yes, of course. If I whant to use jQuery methods I could also use filter(): $('#myid').filter('div.myclass').addClass('hereWeGo'); But I

Re: [jQuery] More DOM Query Speed Tests

2006-12-18 Thread Christof Donat
Hi, looking for an ID (which should be unique) after getting the tags is worthless. Well, it shouldn't be. I might whant to hide an Element with the id myid only if it is an image. Then I'd try first $('img#myid').hide() and expect it to work like $('#myid').filter('img').hide(). Christof

Re: [jQuery] More DOM Query Speed Tests

2006-12-18 Thread Christof Donat
Hi, $(.dialog) does 815 function calls () $('#speech28') does 6 function calls That is not very surprizing. $('#speech28') only needs to call getElementById() and make a jQuery Object from it. $('.dialog') gets all elements, puts them into an array and filters that array for the

Re: [jQuery] setTimeout in jquery function

2006-12-17 Thread Christof Donat
Hi, timeout = setTimeout(arguments.callee,5000); works well for me too. Do you have this set correctly in the callback then? Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] setTimeout in jquery function

2006-12-16 Thread Christof Donat
Hi, I'm not sure how to change the line: setTimeout(zoom_in(),time_length) to that the function can call itself. Help appreciated. I'd suggest to split it in two functions as many parts of jQuery itsself do: jQuery.zoom_in = function(elm,time,step,callback) { var e = $(elm);

Re: [jQuery] this verus (this)

2006-12-12 Thread Christof Donat
Hi, Why do I need to wrap the this with $(this) - (when using $('#...').each) - why isnt' that done automatically? Most of the time you use each(), because you want to access the DOM Objects. That is exactly what you get as this. In most cases you need a jQuery Object you can do your work

Re: [jQuery] Why the old school browser detection

2006-12-11 Thread Christof Donat
Hi, Mozilla added document.all if I remember correctly. And so on... You can use document.all with Mozilla, but if(document.all) ... else ... still choses the else path. It is opera that has problems with it - I trapped into it. To detect IE (which is 90% of what I need) I now use

Re: [jQuery] Designing for reuse

2006-12-02 Thread Christof Donat
Hi, // imagine yourself some code in these functions. [...] Event.observe($(#switch), 'click', switchViews) I like that. In jQuery-style it could be something like this: jQuery('#switch').bind('click',function() { var showme = jQuery.treeView('#mytree'); var hideme =

Re: [jQuery] Designing for reuse

2006-12-01 Thread Christof Donat
Hi, Controller set of methods is returned.. $('#grid').grid().data(data).drig().show() $('#grid').grid().scrollToRow(6).drig().css(border, 1px) A controller object is returned.. var grid = null $(grid).grid({ data: data, onComplete: function(controller) { grid = controller }

Re: [jQuery] Designing for reuse

2006-12-01 Thread Christof Donat
Hi, $('#grid').grid({data:data}).show().gridController().scrollToRow(6); An perhaps have a method that returns you back to jQuery object? Calling it 'end' (or any other jQuery method name) may be confusing, something like 'endGrid'. I don't think that is necessary. You could compare it to

Re: [jQuery] beginner's problem

2006-11-30 Thread Christof Donat
Hi, Sounds to me like your using absolute URLs in your AJAX requests. If your trying to call http://localhost/something.php, just type 'something.php' as the url. Firefox doesnt like anything starting with http:// . Well, Firefox has no Problems with absolute URLs in a XMLHttpRequest, but you

Re: [jQuery] .css works not correct for me

2006-11-29 Thread Christof Donat
Hi, it's textAlign! Both should work. Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] New Plugin: modalContent

2006-11-29 Thread Christof Donat
Hi, I find the jQ src is compressed. could you tell me what tools can compress the js myself ? AFAIK John uses this: http://dean.edwards.name/packer/ You can also try http://sourceforge.net/projects/jsquash Very early stage of development, but in the most cases if works for me. JSquash

Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Christof Donat
Hi if( jQuery.parse2RE == 0 ) { // this is the first call to filter_opt, so // replace S and T macros in the parse2 regexps var S = ([a-z*_-][\\w-]*); You can not be shure that a JavaScript Engine is not

Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Christof Donat
Hi, Yes, but if it's not 0 it's ok I guess. I have not analyzed your code deeply. It was just something I sumbled across. There is a preprocessing step that sets parse2RE, and if it's not 0 isn't it safe to suppose it holds the correct RegExp object set during preprocessing? Ah, I

Re: [jQuery] filter refactored with the engine of Chili

2006-11-28 Thread Christof Donat
Hi, You can not be shure that a JavaScript Engine is not threaded. This code is not threadsave. Is there an implementation of javascript that supports context switching? The engine itsself usually does no contextswitch, but it may start multiple threads to handle multiple Events

Re: [jQuery] .css works not correct for me

2006-11-28 Thread Christof Donat
Hi, Hi @all, i will a DIV appand to ID test and give test a little bit of CSS, this works fine $(#test).css({overflow:hidden}).append(div .. This fails: $(#test).css({text-align:center}).append(div .. what is to do?

Re: [jQuery] OT: mail delivery

2006-11-28 Thread Christof Donat
Hi, Well... I did notice the same thing with a mail I sent to the list a few days ago. Arrived in my inbox approx 8 hours after I sent it. Me too. Christof ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] Working on a getScripts plugin

2006-11-26 Thread Christof Donat
Hi, The thread I was referring to is this one: http://www.nabble.com/getScript-error-tf2652417.html OK, It leads to the same solution. I simply added this to my code: if( ! window.execScript ) window.execScript= function(src) { eval.call(window,src); }; One of my last messages

Re: [jQuery] Working on a getScripts plugin

2006-11-25 Thread Christof Donat
Hi, In another thread (getScript error), we were discussing alternatives because it seems not to work as expected, at least for a delay of 0 milliseconds. Are you talking about this thread? http://www.nabble.com/eval.call(-window,jscode)-does-not-work-in-IE-tf2202851.html#a6099563 The

Re: [jQuery] Working on a getScripts plugin

2006-11-25 Thread Christof Donat
Hi, I've looked at your package.js, and I've found that you use the setTimeout method for evaluating the loaded script in the global scope, with a delay of 1 millisecond. Don't you have any problems with that? No, I have not experienced any problems with that up to now. I guess, that it

Re: [jQuery] Working on a getScripts plugin

2006-11-24 Thread Christof Donat
Hi, But I don't understand the drawback. If the loaded scripts are evaluated as soon as they are loaded, before calling the callback in $.getScript AFAIK, there should be no problem, except that getScript does not support library registration, so there is a risk for looping indefinitely.

Re: [jQuery] Working on a getScripts plugin

2006-11-24 Thread Christof Donat
Hi, $.getScript() is assynchonous. That means, that it returns before the script is loaded. Yes, but if I put all my code into the callback? That does not help, if your loaded script needs to load another script. Christof ___ jQuery mailing

Re: [jQuery] Working on a getScripts plugin

2006-11-24 Thread Christof Donat
Hi, That does not help, if your loaded script needs to load another script. For example: file a.js is [ $.getScript( b.js, function() { doA(); } ); ] file b.js is [ $.getScript( c.js, function() { doB(); } ); ] file c.js is [ doC(); ] the page has: [ script src=jquery.js - script

Re: [jQuery] Working on a getScripts plugin

2006-11-24 Thread Christof Donat
Hi, No, the order could be doA() doC() doB(). That is because doA() is called as soon as b.js is loaded but before c.js is loaded. The call to $.getScript() in b.js returns immediatelly and loads c.js assynchonously. Then b.js is finished and doA() is called while c.js is still

Re: [jQuery] Working on a getScripts plugin

2006-11-24 Thread Christof Donat
Hi, An alternative could be to inspect any loaded script and see if it requires more scripts (recursively). I think that that would be too complicated. In jsPax I simpy expect the scripts to generate a specific Object which depends on the name of the script. If that object exists after the

Re: [jQuery] jQuery namespacing your code

2006-11-17 Thread Christof Donat
Hi, $.namespace(org.jquery.utils) You can use jsPax (http://jspax.cdonat.de/). Then you call it $package(org.jquery.utils, { HelloWorld = function() {alert(this.blabla);} }); org.jquery.utils.blabla = 'Hi'; $package(org.jquery.test, {}); org.jquery.test.wow = function()

Re: [jQuery] jQuery namespacing your code

2006-11-17 Thread Christof Donat
Hi, var dragan = {}; What this mean? I suppose it creates an object? Yes. The fiew lines could also be written like this: var dragan = { debug: function(info) {     // do all sorts of fancy stuff } }; Christof ___ jQuery

Re: [jQuery] Next generation WYSIWYG editor... maybe? am I missing something?

2006-11-16 Thread Christof Donat
Hi, - Integrate in to our sites without requiring CSS tweaks to get it looking correct - this means no iframes. IIRC gecko can only edit full documents. You need to create an iframe to have an area in a page editable. - Produce strict XHTML every time without fail. FCKeditor does

Re: [jQuery] jQuery 1.1 by the end of Nov

2006-11-16 Thread Christof Donat
Hi, * jQuery.find recursively collects every node in the document tree and copies that list into a second array; * jQuery.filter builds/compiles a regexp to get the class name, then builds/compiles a function to check the class name; * jQuery.grep calls that function once for each

Re: [jQuery] jQuery sites

2006-11-14 Thread Christof Donat
Hi, 1. http://www.payroll.com. Used jQuery for manipulating the icons on the local nav and creating some visual effects. Works fine with Firefox, but in Konqueror (3.5.5) I don't even see the content. The tab-widget with its contents is simply not there. Christof

Re: [jQuery] if/then equivalents in jQuery

2006-11-12 Thread Christof Donat
Hi, I don't have much time to help you now, but better formated code might help others: $.fn.ajaxSubmitEmail = function(e) { this.submit(function(){ var params = {}; $(this).find([EMAIL PROTECTED], [EMAIL PROTECTED]'text'], [EMAIL PROTECTED]'hidden'],

Re: [jQuery] New way of animating

2006-11-07 Thread Christof Donat
Hi, When doing $(#mydiv).animateClass('myFirstClass', 'mySecondClass'), the object is transparently cloned at opacity 0.0001 or visibility hidden with the given new class, then the style of this clone is computed, then a diff is made between the old computed style properties and the new ones,

Re: [jQuery] New way of animating

2006-11-07 Thread Christof Donat
Hi, check my new email thread here to answer your questions: http://www.nabble.com/New-plugin-draft%3A-animateClass-tf2588487.html Looks nice, but - How does this work with properties like e.g. display, or border-style? You can not gadually blend them. I have not found a solution for

Re: [jQuery] New way of animating

2006-11-07 Thread Christof Donat
Hi Sure Christof, this is the limitation. from solid to dotted is just not possible :) If you have an animate-function that takes CSS-code you can simply define that it won't work with these attributes, but if you have an animate-Function that takes a class name, you'd expect the result to

Re: [jQuery] New way of animating

2006-11-06 Thread Christof Donat
Hi, but now my own killer feature :D 3.) $(#mydiv).animateClass(oldClass, newClass); -or- $(#mydiv).animateClass(newClass); That would be nice, but what about this: .myFirstClass { display:inline; background-color:#00; } .mySecondClass { display:block;

Re: [jQuery] Oooh! These are pretty!

2006-10-29 Thread Christof Donat
Hi, What about the approach taken in those rounded corner scripts ? I know that some versions use images and it seems that others have an algo approach. IIRC it uses the same approach as Walter Zorns library. That is a great idea, but it needs to generate many DOM-Nodes. In case you draw

Re: [jQuery] Height overwrite

2006-10-27 Thread Christof Donat
Hi, $(document).ready(function() { var THeight = $(textarea).height(); var Diff = 40; $('.resize').click(function(){ NHeight = (THeight + Diff); NHeight = (NHeight+px) alert (NHeight); $('textarea').css(height,NHeight).slideDown('slow'); try

Re: [jQuery] Height overwrite

2006-10-27 Thread Christof Donat
Hi, I can not the Textarea give any ID or CLASS, to establish understanding ;) Yes you can: $('textarea').each(function(i) { $(this).id('txtarea_'+i). after('p class=resize id=resizer_'+i+'houml;her/p'); }); $('resize').click(function() { var txt =

Re: [jQuery] Oooh! These are pretty!

2006-10-27 Thread Christof Donat
Hi, A cross-browser canvas approach is possible: http://me.eae.net/archive/2005/12/29/canvas-in-ie/ That is just an implementation for IE. That is not enough for a cross-browser canvas. IIRC ExplorerCanvas (the project that emil now seems to be involved) creates VML-Elements, which can be

Re: [jQuery] Oooh! These are pretty!

2006-10-27 Thread Christof Donat
Hi, Also, from my original post on this look at the dojo implementation! They already have an API and code if it can be jQuerified. They don't work with Konqueror 3.5.5 and Opera 8.52. Walter Zorns Library works in both. Christof ___ jQuery

Re: [jQuery] performance optimizations?

2006-10-26 Thread Christof Donat
Hi, Are there any tricks to help this out? For example is it better to use xpath or css type searches for better performance? You may speed your code up ba choosing the selector. Usually just searching for the id ahould be the fastest: $('#myid'). Number Two is searching for the tag type:

Re: [jQuery] How to cache jQuery

2006-10-26 Thread Christof Donat
Hi, i use jQuery on multiple pages of my site so it would be nice to make sure that this file is only loaded once and not on every menu change. Is there a cross-browser way (for jQuery supported browsers) to cache the file and make it load only once ? Yes: Make it a normal file. The browser

Re: [jQuery] performance optimizations?

2006-10-26 Thread Christof Donat
Hi, search for classes: $('.myclass',$('#commonAncestor')[0]). Thats actually the same as: $('#commonAncestor .myclass') For that example that ist true, but you might have cached your context: var mycontext = $('#commonAncestor')[0]; $('.menuitems',mycontext).hide();

Re: [jQuery] How to cache jQuery

2006-10-26 Thread Christof Donat
Hi, I have one file that do all my sitemanagment, it's a very simple php that i use like this: index.php?menu=filelang=deoption=xyz. Inside index.php i just include the files needed (of course with a test to only proceed menupoints available). So the jquery.js file is allways loaded in head

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

2006-10-23 Thread Christof Donat
Hi, I would like to be able to load my jquery plugins dynamically as this would reduce the number of scripts in my document head. I have my jsPax-Script: jspax.cdonat.de That is traditional JS-code without jQuery-stuff, because I even load jQuery dynamically. You will have to slightly modify

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

2006-10-23 Thread Christof Donat
Hi, function addScript( url ) { var script = document.createElement( 'script' ); script.type = 'text/javascript'; script.charset = 'utf-8'; script.src = url; document.getElementsByTagName('head')[0].appendChild( script ); }; There are some Safari

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

2006-10-23 Thread Christof Donat
Hi, What about $.getScript(myplugin.js, callback)? With all the code you want to run in the callback function. For that you need jQuery and the Ajax-Plugin to be already loaded. In jsPax I don't use jQuery anywhere. I didn't whant it to be dependant on anything, because then I can make a

  1   2   >