> <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/javascript"
> as we know from vb and other abominations.
>
> 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...
>
> WHAT do you think about this?
That sounds like it would be a great solution, assuming classes don't have
the flexibility you need. I tried this and it seems to work.
$(document).ready(function(){
$("[EMAIL PROTECTED]'text/x-jquery-json']")[0].text);
});
<script type="text/x-jquery-json">
{ accordion: "whatever", polka: "dotted"}
</script>
Firefox 1.5: alerts { accordion: "whatever", polka: "dotted"}
Opera 9.02: alerts { accordion: "whatever", polka: "dotted"}
IE 6: alerts { accordion: "whatever", polka: "dotted"}
Hooray!
I noticed that jQuery's .text() and .html() methods don't get the script
content in IE6. The element's .text property is the only one that worked on
all three.
Can someone test Safari?
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/