On Jul 13, 11:20 pm, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote: > pardon my ignorance... i dont understand the purpose...
The purpose would be to allow easier inclusion of jQ code from server- side scripts (in this case PHP). As it stands now, to create jQ code from PHP you either have to import hard-coded JS snippets (if using static code) or create the code using strings (which can get messy for non-trivial cases). e.g., the above example might currently be implemented like so (in PHP): echo <<<EOF <script type='text/javascript'> \$(function(){ \$("#test").show(); if(\$("test2").size() == 1){\$("#test").jqmShow(); } }); </script> EOF; but that of course can get very messy if you have a lot of server-side conditionals which need to be processed while generating the code, and can be messy in any case because one has to be careful to escape all of the $ characters. Having a PHP JQuery object which can create this code would make that much cleaner.