Re: [jQuery] Tabs plugin feature request
On Thursday 17 August 2006 16:30, Klaus Hartl wrote: > Yes, such tabs wouldn't be accessible anymore, and not unobtrusive > either because you would have useless links hanging around, pointing to > some empty divs if JavaScript is disabled. > > Therefore I wouldn't go so far and implement Ajax calls on tab click. I > cannot see the use here, to me it's like using Ajax for the sake of > Ajax. The user would even have to wait for the content to be loaded > (first click), and that is not what I call very usable. > > Nonetheless, with the callback mechanism it would be pretty easy to > implement such a function and pass it as callback. But this should not > be part of the plugin in my eyes. Oh I agree completely. The tab plugin itself shouldn't bother with Ajax. However, pre and post callbacks then make it easy for someone to tie the ajax functionality in themselves, creating the tabbed-ajax setup I described. It's all about powerful building blocks. :-) -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED] ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Error in current jquery version
Hi,know, the error doesn't appear any longer. Thanks.But there is a new error: Unfortunatelly, the function getFormData doesn't stop the submit-process as in older jQuery-versions. The page is reloaded. Any idea, why this happens?Mathias ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Find first element (child)
ahh the simplicity of jQuery :)On 8/18/06, John Resig <[EMAIL PROTECTED]> wrote: $("p a:first").hide();enjoy!--John___jQuery mailing listdiscuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Find first element (child)
$("p a:first").hide(); enjoy! --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Find first element (child)
Hello,I would like to use .find, but only for the first element of the results. If I have link 1 link 2 and I do $("p").find("a").hide(); this hides both links. I would only like to hide the first. Can I do this with find, or can I use $("p").children()?Cheers,Julius Lucks-- - http://openwetware.org/wiki/User:Lucks- ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Any IE6 related input element changes recently?
I was using SVN ~208 or so. I found some 'neat' information while debugging in the script editor. Apparently, document.getElementsByTagName('input') didn't work properly either. I called that, then looped though printing the name attribute. Most came up as undefined, even though i /know/ they have (had?) names. I ended up using a hack for IE 6 (your right, I meant IE6) involving $('#formiwant')[0].elements[nameIwanted], but I still can't figure out how such an odd condition could come to exist. Either way, problem is 'fixed' now. Thanks anyway. Dave Methvin wrote: >> It works normally in firefox, so i don't understand why it doesn't in IE5. > > Sounds like you meant IE6, it's working fine in IE6 for me (SVN 169 was what > I had handy). What version of jQuery are you using? > > Going to jquery.com I did notice that it's very easy to grab an ancient > version of the code. The "latest" version is from May. Since John's only > days away from the 1.0 release that problem should go away--and be replaced > by calls for updated documentation. :-) > > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Can jQuery SVN get / set element dimensions?
> > $().height(), $().width() and others doesn't work, > > just because of small mistype > > Should be fixed now: > http://proj.jquery.com/dev/bugs/bug/121/ Oops, it appears as if the code actually regressed at one point - it should be fixed again, in SVN rev 214. --John ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Simple checkbox replacement
Just in case anyone tries to implement the code below, this.src returns the full url path for the image, and so string manipulation is needed for the this.src == opt.checked statement. A better approach I've found is to use var check = $(this).next().attr( "checked" ) == true; I'm testing against Rev 200 of SVN code. The simple DOM creation stuff in it is pretty fun. Kawika John Resig wrote: > This is some great code - I really dig it. It's super simple, which is good. > > Just as a mini-tutorial to the upcoming 1.0b, here are some of the > changes that are possible: > > jQuery.fn.checkbox = function (opt) { > $("[EMAIL PROTECTED]'checkbox']", this).hide().each(function(){ > $("") > .src( this.checked ? opt.checked : opt.unchecked ) > .click( function() { > var check = this.src == opt.checked; > > $(this) > .src( check ? opt.unchecked : opt.checked ) > .next().attr( "checked", check ? "" : "checked" ); > }).insertBefore( this ); > }); > }; > > I'm not saying that mine is any better - just using this as a > demonstration of what's possible. > > --John > >> Example >> http://kawika.org/jquery/checkbox/ >> >> >> Code >> jQuery.fn.checkbox = function (opt) { >> >> $("[EMAIL PROTECTED]'checkbox']", this).each( function () { >> >> var img = document.createElement("img"); >> img.src = this.checked ? opt.checked : opt.unchecked; >> >> $(img).click( function() { >> >> var input = this.nextSibling; >> if ( input.checked ) { >> this.src = opt.unchecked; >> input.checked = ""; >> } >> else { >> this.src = opt.checked; >> input.checked = "checked"; >> } >> }); >> >> $(this).parent().prepend(img) >> $(this).hide(); >> }); >> } >> >> >> Usage >> $(document).ready( function () { >> $().checkbox({checked: "accept.png", unchecked: "cancel.png"}); >> }); > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New to jquery - how do I...
> You can start your search by looking into Interface (for jQuery) which > includes a full Drag-and-Drop set of functionality. This, in addition > to the normal jQuery, should get you to where you need to be: > http://www.eyecon.ro/interface/ Thanks. I hope to give it a try tomorrow. I went ahead and implemented the functionality in prototype.js. Not elegant, but a hacked solution to get this one-time job done quickly. It should be interesting to see which solution looks cleaner. Sam ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Fwd: Tabs plugin feature request
Oops attachment not accepted... pls find code below-- Forwarded message --From: ashutosh bijoor <[EMAIL PROTECTED] >Date: Aug 18, 2006 7:30 AMSubject: Re: [jQuery] Tabs plugin feature requestTo: "jQuery Discussion."Hi Pls find attached, jtabs.js with the callback modification. Basically added the following lines at line number 72: // apply callback function if defined if (typeof options.callback != 'undefined' && options.callback.constructor==Function) { options.callback.apply(target,[target.attr('id'),visible.attr('id')]); }Here, I'm passing two parameters to the callback: - the id of the new tab's container and- the id of the new tab's containerAlso, this will point to the current tabRegardsAshutosh On 8/18/06, Klaus Hartl <[EMAIL PROTECTED]> wrote: ashutosh bijoor schrieb:> Hi Klaus> I've been playing around with your tabs plugin, and would very much like> it if you could add a callback facility. ie, when the tab is changed,> i'd like a function to be called in the scope of the active tab. > I can make this change myself, but dont know whether i have the latest> version. does the URL quoted below contain the latest version?> Regards> AshutoshI assume you would like to have the possibility to have different callbacks for each tab or alternatively one function for all or evenboth together?-- Klaus___jQuery mailing list discuss@jquery.comhttp://jquery.com/discuss/ -- Reach1to1 Communicationshttp://www.reach1to1.com [EMAIL PROTECTED]98201-94408 -- Reach1to1 Communicationshttp://www.reach1to1.com[EMAIL PROTECTED]98201-94408 ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] JSON Arrays *tad off topic hehe*
I am useing JSON.php to convert my mutli demional array in to json. I am just posting it in to a var for now testing the innerhtml creates i need some help on figuring out how to access the array once in the js block. http://3spn.net/jQuery/dom_creation.html I have constructed a dummy array that is the same as the php ajax responce will put out. I did double post this to a point i moved it out side of the dom creation topic header! :) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] New to jquery - how do I...
You can start your search by looking into Interface (for jQuery) which includes a full Drag-and-Drop set of functionality. This, in addition to the normal jQuery, should get you to where you need to be: http://www.eyecon.ro/interface/ Hope this helps! --John On 8/17/06, Sam <[EMAIL PROTECTED]> wrote: > > > I wanted to solicit help here to jump-start my first jquery development... > I've some experience with prototype.js, and would like to start a small > project using jquery. > > > > >cellspacing="0" id="maintable"> > > main > content > A re-engineering of your current world view will reaffirm > your online presence enabling a more effervescent solution. Upscaling > voluminous networking exchange solutions will result in your achieving an > excellent systemic electronic data interchange synchronization, thereby > exploiting technical environments for mission critical broad-based > capacity-constrained systems. > > > > > > > I'd like to make the 2nd cell, which is as tall as the first cell, into a > mouse-grabbable handle which can be used to control the width of the first > cell. > > I should research this further, any pointer in the right direction with > jQuery is appreciated. > > Sam > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > > -- John Resig http://ejohn.org/ [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Error in current jquery version
Without actually testing it (heh) I'm going to start by saying that there's some changes that you need to make to Crockford's JSON script - because that's what may be causing problems for you. He attaches a function to every single Object - which just blows my mind at how dumb that is. For example, I use his JSON script, but a modified version that behaves more cleanly. You can find my modified version here: http://john.jquery.com/jquery/build/js/json.js To serialize an object you do: Object.toJSON( obj ); To deserialize you do: someString.parseJSON(); Let me know if that change helps you at all. --John On 8/17/06, Mathias Bank <[EMAIL PROTECTED]> wrote: > Hallo, I have tried to use jquery for a current project. To test it, I have > created following code: > > < > html> > > JSON-Test title> > "text/javascript" src="json.js"> > language="JavaScript" type="text/javascript" > src="jquery.js"> > "JavaScript" type="text/javascript"> > function getFormData() { > var test1 = $("#test1").val(); > var test2 = $("#test2").val(); > > var obj = new Object(); > obj.test1 = test1; > obj.test2 = test2; > > var objString = obj.toJSONString(); > > $.post("json.php", {data: objString}, handleJsonResponse); > return false; > > } > > > function handleJsonResponse(data) { > var obj = data.parseJSON(); > > $("#test1").val(obj.test1); > $("#test2").val(obj.test2); > } > > > $(document).ready(function(){ > > $("#formular").submit(getFormData); > }); > > > > < > body> > "/projekte/test/json.php" method="post"> > ="text" name="test1" id= > "test1" /> > ="text" name="test2" id= > "test2" /> > ="submit" name="submit" id= > "submit" value="senden"/> > > > > > > > > I use jquery Rev: 213 (complete) > > When I'm loading the page in Firefox or Internet-Explorer (at different pcs) > > I get the error "Too much recursion" on line 71 (many times), line 104, > 1597. > > Any idea, why this error appears? I use WinXP with current updates. > > Mathias > > > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > > -- John Resig http://ejohn.org/ [EMAIL PROTECTED] ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Wacked IE with the wrap function
> ...with an informative "Internet Explorer cannot open the Internet site..." What is the full error message? A couple of weeks back someone reported a similar issue that came down to changing certain parts of the body too quickly for IE. You might try changing any .ready() to .load() to see if that helps. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Setting AJAX headers, and selecting namespaced nodes
Hi there! I've been impressed with all the work and effort that's gone into jQuery, and I've decided to try to use it for a WebDAV AJAX application I'm working on. I've run into two issues off the bat: the first is that an $.xml (or $.ajax) call does not seem to support setting your own HTTP headers. To get this work may be as simple as adding a 'headers' parameter to the function and the following code before the final xml.send call: if ( headers ) for (var name in headers) xml.setRequestHeader(name, headers[name]); It's a simple enough change, but I think it's a worthwhile enhancement, and I'd feel better if there was a way to set them using the core library and without having to manually overwrite the $.ajax function. The second issue is that, using the $(path, context) call, I couldn't find a way to select XML nodes with a namespace and prefix, such as 'D:response'. An earlier version of jQuery seemed to be able to select it using the path "response", which would've been fine, but more recent versions don't seem to be able to (specifically, the $.tag function matches them, but the $.filter function doesn't preserve them). Is there any way to select namespaced and prefixed nodes without using a direct getElementsByTagNameNS call? Thanks for your help! — Mitch ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Another Easy Dom creation for JQuery
It's not plugin but jQuery core function attr duing this. attr: function(o,a,v){ ... if ( v != undefined ) { o[a] = v; // o.className = "myClassName" :: if ( o.setAttribute && a != "disabled" ) o.setAttribute(a,v); // o.setAttribute('className', "myClass") :: } ... }, On 8/17/06, Madison Bryan <[EMAIL PROTECTED]> wrote: > > I'm using Another Easy DOM creation extension... > > http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and- > prototype#comment-176 > > to dynamically create a section from a JSON request... > > $.tpl(pArray, function(){ >return [ > 'address',{'class':"vcard"},[ > 'span',{'class':"fn"}, [this.FIRST_NAME+' > '+this.LAST_NAME], > 'span',{'class':"org"}, [this.SEARCH], > > 'a',{'href':"mailto:"+this.EMAIL,'class':"email"}, [this.EMAIL], > 'span',{'class':"tel"}, [this.PHONE_NUMBER], > 'span',{'class':"url"}, > ['a',{'href':this.URL}, [this.URL]] > ]]; > }).appendTo('#section-'+sec); > > For some reason, it's adding an extra attribute called classname... > > ... > > ...to all the elements. I can't seem to figure out why it's doing this. > > Does anybody have an idea? > > Thanks, > Madison > > ___ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Wacked IE with the wrap function
Interestingly enough, I'm fine with the first link, but I get the error listed on the second link. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Madison Bryan Sent: Thursday, August 17, 2006 4:48 PM To: discuss@jquery.com Subject: [jQuery] Wacked IE with the wrap function I have an odd problem that I am at a loss on. IE on Windows dies on this page... http://www2.westga.edu/majors/ ...with an informative "Internet Explorer cannot open the Internet site..." I've narrowed it down to a line of js... $("#wrapper").wrap(''); ...and an unordered list that gives an index (" A B C..."). If I remove either, it works. Now, the odd thing is that IE has no problem on any of the other pages, which use the same line of javascript... including a page that uses the same a-z index (both pages use the same function to create the a-z index)... http://www2.westga.edu/az/ Arg, one more reason to curse IE. Any help would be greatly appreciated. Thanks, Madison ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Wacked IE with the wrap function
I have an odd problem that I am at a loss on. IE on Windows dies on this page... http://www2.westga.edu/majors/ ...with an informative "Internet Explorer cannot open the Internet site..." I've narrowed it down to a line of js... $("#wrapper").wrap(''); ...and an unordered list that gives an index (" A B C..."). If I remove either, it works. Now, the odd thing is that IE has no problem on any of the other pages, which use the same line of javascript... including a page that uses the same a-z index (both pages use the same function to create the a-z index)... http://www2.westga.edu/az/ Arg, one more reason to curse IE. Any help would be greatly appreciated. Thanks, Madison ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Tabs plugin feature request
ashutosh bijoor schrieb: > Hi Klaus > I've been playing around with your tabs plugin, and would very much like > it if you could add a callback facility. ie, when the tab is changed, > i'd like a function to be called in the scope of the active tab. > I can make this change myself, but dont know whether i have the latest > version. does the URL quoted below contain the latest version? > Regards > Ashutosh I assume you would like to have the possibility to have different callbacks for each tab or alternatively one function for all or even both together? -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Tabs plugin feature request
Jörn Zaefferer schrieb: > Hi Larry! > >> You have n tabs. Each one is not actually loaded. When you switch to it, >> however, a callback fires that Ajax-loads the contents of that tab, >> possibly skipping that if it's already been loaded. >> >> Sorry, I just put 2 and 2 together and got a very cool 10. :-) > > Sounds interessting. But if I get it right, those tabs wouldn't be > unobtrusive any more, right? > > -- Jörn Yes, such tabs wouldn't be accessible anymore, and not unobtrusive either because you would have useless links hanging around, pointing to some empty divs if JavaScript is disabled. Therefore I wouldn't go so far and implement Ajax calls on tab click. I cannot see the use here, to me it's like using Ajax for the sake of Ajax. The user would even have to wait for the content to be loaded (first click), and that is not what I call very usable. Nonetheless, with the callback mechanism it would be pretty easy to implement such a function and pass it as callback. But this should not be part of the plugin in my eyes. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Tabs plugin feature request
On Thu, August 17, 2006 3:55 pm, Jörn Zaefferer said: > Hi Larry! > >> You have n tabs. Each one is not actually loaded. When you switch to >> it, >> however, a callback fires that Ajax-loads the contents of that tab, >> possibly skipping that if it's already been loaded. >> >> Sorry, I just put 2 and 2 together and got a very cool 10. :-) > > Sounds interessting. But if I get it right, those tabs wouldn't be > unobtrusive any more, right? > > -- Jörn True, if you go with dynamic loading of tab content then it doesn't degrade nicely. That's a trade-off with any dynamic-content-loading system. But if you don't do that, then the tab system itself would still degrade nicely. --Larry Garfield ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Any IE6 related input element changes recently?
> It works normally in firefox, so i don't understand why it doesn't in IE5. Sounds like you meant IE6, it's working fine in IE6 for me (SVN 169 was what I had handy). What version of jQuery are you using? Going to jquery.com I did notice that it's very easy to grab an ancient version of the code. The "latest" version is from May. Since John's only days away from the 1.0 release that problem should go away--and be replaced by calls for updated documentation. :-) ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dom creation
Hey things seem to be going along nicely just need a push over the edge :) http://3spn.net/jQuery/dom_creation.html I have constructed a dummy array i need to figure out how to transverse and access the data i know it should be simple reading around now might not need help. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Tabs plugin feature request
Hi Larry! > You have n tabs. Each one is not actually loaded. When you switch to it, > however, a callback fires that Ajax-loads the contents of that tab, > possibly skipping that if it's already been loaded. > > Sorry, I just put 2 and 2 together and got a very cool 10. :-) Sounds interessting. But if I get it right, those tabs wouldn't be unobtrusive any more, right? -- Jörn ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Tabs plugin feature request
-- Larry Garfield On Thu, August 17, 2006 3:19 pm, Klaus Hartl said: > > > ashutosh bijoor schrieb: >> Hi Klaus >> I've been playing around with your tabs plugin, and would very much like >> it if you could add a callback facility. ie, when the tab is changed, >> i'd like a function to be called in the scope of the active tab. >> I can make this change myself, but dont know whether i have the latest >> version. does the URL quoted below contain the latest version? >> Regards >> Ashutosh > > This can be very useful... I will add that soon! > > -- Klaus Use case here: You have n tabs. Each one is not actually loaded. When you switch to it, however, a callback fires that Ajax-loads the contents of that tab, possibly skipping that if it's already been loaded. Taing it a step further, an on-leaving callback would let you auto-submit a form in a given tab as soon as you tab away from it. Instant-save tabbed forms for the cost of 2 callbacks. Sorry, I just put 2 and 2 together and got a very cool 10. :-) --Larry Garfield ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Tabs plugin feature request
ashutosh bijoor schrieb: > Hi Klaus > I've been playing around with your tabs plugin, and would very much like > it if you could add a callback facility. ie, when the tab is changed, > i'd like a function to be called in the scope of the active tab. > I can make this change myself, but dont know whether i have the latest > version. does the URL quoted below contain the latest version? > Regards > Ashutosh This can be very useful... I will add that soon! -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Can jQuery SVN get / set element dimensions?
> $().height(), $().width() and others doesn't work, > just because of small mistype Should be fixed now: http://proj.jquery.com/dev/bugs/bug/121/ ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Error in current jquery version
Hallo, I have tried to use jquery for a current project. To test it, I have created following code:< html>JSON-Test title>