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 as easy as possible. Instead of introducing jQuery to your
team, why not just stick to simply javascript that is more common, eg:
<script type="text/javascript">
accordion('id of element', { showSpeed: 'slow', hideSpeed: 'fast' });
</script>
And implement it like this:
function accordion(id, options) {
$(function() {
$(id).accordion(options);
});
}
You can't avoid telling them some kind of syntax to specify the options,
so just use js to avoid any custom parsing. Using a script tag should be
valid and unobtrusive. Can't imagine a case where a designe could or
would accidently display the content of a script tag.
In the next step, tell them to collect all those snippets at one
place... and introduce them to jQuery directly!
--
Jörn Zaefferer
http://bassistance.de
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/