Re: [jQuery] Plugin method question

2006-11-01 Thread Paul McLanahan
How cool... it sure does! I just tested the following code in IE7, FF 1.5.0.7 and Safari 1.3.2, and all I got was an alert box with the word Whatnot. script type=text/x-jquery-jsonalert(Was run as JS.)/script script type=text/x-jquery-json{accordion:false,stuff:Whatnot}/scriptdl

Re: [jQuery] Plugin method question

2006-11-01 Thread Jörn Zaefferer
Klaus Hartl schrieb: Paul, whenever you happen to be in Berlin I'll get you a beer (or two or three...). And Jörn as well! Heh. Just tell me if one of you gets to Cologne. Got plenty of beer here, too! :-) -- Jörn Zaefferer http://bassistance.de

Re: [jQuery] Plugin method question

2006-11-01 Thread John Resig
But perhaps I'm misunderstanding you. Do you mean for there to just be a JSON string inside the script tag? I've never used a script tag for anything other than to tell an interpreter to parse and run the script inside, be it javascript, php, VB or something like that. If you give it a

Re: [jQuery] Plugin method question

2006-11-01 Thread Mark Gibson
Ⓙⓐⓚⓔ wrote: let's just use the informal type text/x-jquery-json that contains 1 js object or text/x-jquery-text for an unquoted string of chars and others... There is an official 'application/json' media type registered at IANA. http://www.iana.org/assignments/media-types/application/ and an

Re: [jQuery] Plugin method question

2006-11-01 Thread Jörn Zaefferer
Paul McLanahan schrieb: Do you guys do that? Yes! I actually didn't code any worth mentioning javascript before knowing jQuery, and I hadn't the slightest idea of DOM manipulation. Using CSS/XPath/Custom expressions is so much more natural. I think the other great thing about jQuery is it's

Re: [jQuery] Plugin method question

2006-11-01 Thread Jörn Zaefferer
Paul McLanahan schrieb: title=accordion:true,showSpeed:'slow',hideSpeed:'fast' I think the most natuaral way to describe that data is javascript itself. That is less error-prone then any kind of custom parser or whatever you and others here have already thought of. You may just want to make it

Re: [jQuery] Plugin method question

2006-11-01 Thread Ⓙⓐⓚⓔ
Wow! we can be official! On 11/1/06, Mark Gibson [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ wrote: let's just use the informal type text/x-jquery-json that contains 1 js object or text/x-jquery-text for an unquoted string of chars and others... There is an official 'application/json' media type

Re: [jQuery] Plugin method question

2006-10-31 Thread Klaus Hartl
Ⓙⓐⓚⓔ schrieb: if you really have to validate, and don't want each spec stuffed into the javascript (script tag or onclick), consider putting the spec inside a code class=accordion_snippet tag (which would be hidden in css) and could be extracted as easily as the title attribute! or a special

Re: [jQuery] Plugin method question

2006-10-31 Thread Klaus Hartl
Brandon Aaron schrieb: What is more important than validation is to do whatever makes it easiest to implement and maintain. May I ask you that question again, once you want to start to deliver your XHTML (as XML) to all kind of devices like mobiles other than the typical web browsers? The

Re: [jQuery] Plugin method question

2006-10-31 Thread Ⓙⓐⓚⓔ
is it as bad as using li ul to create menus or using classes for non-css purposes? my $.002 cents! On 10/30/06, Klaus Hartl [EMAIL PROTECTED] wrote: Ⓙⓐⓚⓔ schrieb: if you really have to validate, and don't want each spec stuffed into the javascript (script tag or onclick), consider

Re: [jQuery] Plugin method question

2006-10-31 Thread Klaus Hartl
Paul McLanahan schrieb: @jake I'm really liking the code tag idea. If I'm understanding you correctly, it would work something like associating a label to an input using the for attribute. I'd just be associating a code tag's contents with a specific DL either by location in the markup or

Re: [jQuery] Plugin method question

2006-10-31 Thread Ⓙⓐⓚⓔ
the only other idea I had was script type=text/x-accordion-parameters but that was too long, On 10/31/06, Ⓙⓐⓚⓔ [EMAIL PROTECTED] wrote: is it as bad as using li ul to create menus or using classes for non-css purposes? my $.002 cents! On 10/30/06, Klaus Hartl [EMAIL PROTECTED] wrote:

Re: [jQuery] Plugin method question

2006-10-31 Thread Klaus Hartl
is it as bad as using li ul to create menus As a menu is semantically wise a list of links that somehow belong together I don't see a problem there. In XHTML 2 there will even be a navigation list (sic!) element nl. or using classes for non-css purposes? According to the HTML Specs, the

Re: [jQuery] Plugin method question

2006-10-31 Thread Blair McKenzie
] Plugin method question Hi jQuerians,I'm a web developer with an internet banking provider. I've been preaching the joys of jQuery to them and they're sold.We have lots of people who maintain the sites we host who aren't the most we'll say... skilled when it comes to _javascript_.So, a good deal

Re: [jQuery] Plugin method question

2006-10-31 Thread Mark Gibson
Paul McLanahan wrote: @jake I'm really liking the code tag idea. If I'm understanding you correctly, it would work something like associating a label to an input using the for attribute. I'd just be associating a code tag's contents with a specific DL either by location in the markup or

Re: [jQuery] Plugin method question

2006-10-31 Thread Olaf Bosch
Michael Geary schrieb: The main reason I'm trying to avoid non-spec attributes is for code longevity. What you think over this: dl dt a rel=accordion:false,showSpeed:'slow',hideAll:true / click me /dt dd to show me /dd /dl

Re: [jQuery] Plugin method question

2006-10-31 Thread Dragan Krstic
 You can supply atributes with initialization of plugin. Code can be like this: $(document).ready( $("#accordion").accordion_plugin({ accordion: true, show_speed:'slow' }); $("#another_accordion").accordion_plugin({ accordion: true, show_speed:'fast' }) ); Or I'm

Re: [jQuery] Plugin method question

2006-10-31 Thread Klaus Hartl
Olaf Bosch schrieb: Michael Geary schrieb: The main reason I'm trying to avoid non-spec attributes is for code longevity. What you think over this: dl dt a rel=accordion:false,showSpeed:'slow',hideAll:true / click me /dt dd to

Re: [jQuery] Plugin method question

2006-10-31 Thread Krzysztof FF
Blair McKenzie-2 wrote: Is there any reason not to simply use a javascript snipit in a script tag? There are good reasons to put code at the start of a page or in a separate file, but in this case I would say that putting it at the top of the relevant tag is perfectly reasonable: ul

Re: [jQuery] Plugin method question

2006-10-31 Thread Brian Miller
Personally, I'd rather use a div or span for that sort of thing, rather than a code tag. div class=accordion_initaccordion:false,showSpeed:'slow',hideAll:true/div Then, style div.accordion_init to be hidden, and you get the same effect without misusing the code tag. - Brian Which would work

Re: [jQuery] Plugin method question

2006-10-31 Thread Brandon Aaron
I would agree that usually a script tag would suit this just fine. However, for me I don't always want that javascript executed. I only want that javascript executed if it is a supported browser. -- Brandon Aaron On 10/31/06, Krzysztof FF [EMAIL PROTECTED] wrote: Blair McKenzie-2 wrote:

Re: [jQuery] Plugin method question

2006-10-31 Thread Paul McLanahan
I have been looking at the Form Validation plugin created by Jörn Zaefferer (which is excellent btw) and the way he used a special class syntax to indicate validation rules for various form elements. He use some specific stuff like class=$v(required,max:15) to indicate that the field is required

Re: [jQuery] Plugin method question

2006-10-31 Thread Klaus Hartl
Brian Miller schrieb: Personally, I'd rather use a div or span for that sort of thing, rather than a code tag. div class=accordion_initaccordion:false,showSpeed:'slow',hideAll:true/div Then, style div.accordion_init to be hidden, and you get the same effect without misusing the code tag.

Re: [jQuery] Plugin method question

2006-10-31 Thread Klaus Hartl
Brian Miller schrieb: Hey listen, I'd love to be able to pack all of the accordion parameters into classes. But, there's just too much information there to make it make-sensical when read by people who are a bit slow on the uptake, as Paul hints might be the case. Another good, but not

Re: [jQuery] Plugin method question

2006-10-31 Thread Dave Methvin
Then, style div.accordion_init to be hidden, and you get the same effect without misusing the code tag. Poor people that have to use a text browser, a screenreader, or simply have switched of CSS... ... Here's another solution that may be suitable for you: Do not put all options into the

Re: [jQuery] Plugin method question

2006-10-31 Thread Brian Miller
Hey listen, I'd love to be able to pack all of the accordion parameters into classes. But, there's just too much information there to make it make-sensical when read by people who are a bit slow on the uptake, as Paul hints might be the case. Another good, but not very semantic solution, was to

Re: [jQuery] Plugin method question

2006-10-31 Thread Klaus Hartl
Paul McLanahan schrieb: I have been looking at the Form Validation plugin created by Jörn Zaefferer (which is excellent btw) and the way he used a special class syntax to indicate validation rules for various form elements. He use some specific stuff like class=$v(required,max:15) to

Re: [jQuery] Plugin method question

2006-10-31 Thread Paul McLanahan
@Klaus and DaveI do like that. Adding an even further layer of abstraction to the mix would be even cleaner for the non-technical to implement. We could have 3 or 4 sets of useful defaults which could be chosen via the second class, or even by an underscore separated single class name where

Re: [jQuery] Plugin method question

2006-10-31 Thread Ⓙⓐⓚⓔ
code, div full javascript each have problems Everybody (well almost) likes the idea of putting scripting in script tags. script tags don't have to be coded as type=text/javascriptm as we know from vb and other abominations. let's just use the informal type text/x-jquery-json that contains 1 js

[jQuery] Plugin method question

2006-10-30 Thread Paul McLanahan
Hi jQuerians,I'm a web developer with an internet banking provider. I've been preaching the joys of jQuery to them and they're sold. We have lots of people who maintain the sites we host who aren't the most we'll say... skilled when it comes to _javascript_. So, a good deal of my job is to

Re: [jQuery] Plugin method question

2006-10-30 Thread Kurt Mackey
Oh yes, and if you really really want to, you could create a custom DTD with your special attribute in it. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul McLanahan Sent: Monday, October 30, 2006 9:38 PM To: jQuery Discussion. Subject: [jQuery] Plugin method

Re: [jQuery] Plugin method question

2006-10-30 Thread Kurt Mackey
to parse out the settings yourself, but its not entirely offensive to a semantic fascist like me. -Kurt From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul McLanahan Sent: Monday, October 30, 2006 9:38 PM To: jQuery Discussion. Subject: [jQuery] Plugin method question Hi

Re: [jQuery] Plugin method question

2006-10-30 Thread Brandon Aaron
9:38 PM To: jQuery Discussion. Subject: [jQuery] Plugin method question Hi jQuerians, I'm a web developer with an internet banking provider. I've been preaching the joys of jQuery to them and they're sold. We have lots of people who maintain the sites we host who aren't the most

Re: [jQuery] Plugin method question

2006-10-30 Thread Brandon Aaron
On 10/30/06, Brandon Aaron [EMAIL PROTECTED] wrote: I use custom attributes for our in-house stuff to make it easier on not only myself but others on my team as well and never bother with a custom DTD b/c the browsers/validators won't use it anyways. What is more important than validation is

Re: [jQuery] Plugin method question

2006-10-30 Thread Kurt Mackey
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brandon Aaron Sent: Monday, October 30, 2006 9:59 PM To: jQuery Discussion. Subject: Re: [jQuery] Plugin method question On 10/30/06, Brandon Aaron [EMAIL PROTECTED] wrote: I use custom attributes for our in-house stuff to make it easier

Re: [jQuery] Plugin method question

2006-10-30 Thread Brandon Aaron
On 10/30/06, Kurt Mackey [EMAIL PROTECTED] wrote: That's strange, unless one of your custom attributes happens to be runat='server'. No we had issues with the form tag and custom attributes with a namespace specifically. Nothing special just something like: ch:validate=true and .net would blow

Re: [jQuery] Plugin method question

2006-10-30 Thread Paul McLanahan
The main reason I'm trying to avoid non-spec attributes is for code longevity. We maintain around 1500 sites, many of which are getting old. So we've been bitten by past bad coding practices more than most. Our policy because of this is to do all new sites completely up to XHTML 1.0 Transitional

Re: [jQuery] Plugin method question

2006-10-30 Thread Ⓙⓐⓚⓔ
I would have put the code inside a div ... can it go inside a dl without breaking the xhtml validatio tool? and I would class the code, so as to not conflict with the normal code tags that may wind up on the page. You and I are on the same page! On 10/30/06, Paul McLanahan [EMAIL PROTECTED]

Re: [jQuery] Plugin method question

2006-10-30 Thread Ⓙⓐⓚⓔ
I would bow to class when the class is a series of NMtokens, I've used it. But for this case the class would be full of tokens that could easily be picked up by css that may have nothing to do with the accordion. On 10/30/06, Michael Geary [EMAIL PROTECTED] wrote: The main reason I'm trying to