Hi Mike,

This is how i would do this.

1) Create a tiddler for scripts, using script tags (e.g. tableScripts
2) replace "$" with "jQuery" - you need to tell TW that you are using jQuery.
3) put <<tiddler tableScirpts>> in the tiddler you want it to work in.

If you want to make a systemConfig tiddler work, add the code in
between<script></script> tags.

I have found firebug [1] very useful for trying out jQuery. I type
jQuery into the console to see if it works then transfer to a tiddler
when it works.

Alex
[1] http://getfirebug.com/


2009/7/13 Mike <[email protected]>:
>
> Good Morning,
>
> I am transcluding the following script via the view template - would
> this work better via a plugin?
> **Requires InlineJavascriptPlugin **
>
> <script>
> /*Table Highlighting for Sortable TW Tables*/
> /*add .evenRow {background-color: #333;} to StyleSheet for alternating
> table row color*/
> (function($) {
> $(document).ready(function( ) {
>        $('table.sortable tbody tr').mouseover(function(){
>                $(this).addClass('highlight')
>                $(this).removeClass('evenRow');
>        });
>                $('table.sortable tbody tr').mouseout(function(){
>                $(this).removeClass('highlight');
>                $('table.sortable tr:even').addClass('evenRow');
>        })
> });
> })(jQuery);
> </script><script>
> /*Table Highlighting for TW Tables*/
> /*add .evenRow {background-color: #333;} to StyleSheet for alternating
> table row color*/
> (function($) {
> $(document).ready(function( ) {
>        $('table.twtable tbody tr').mouseover(function(){
>                $(this).addClass('highlight')
>                $(this).removeClass('evenRow');
>        });
>                $('table.twtable tbody tr').mouseout(function(){
>                $(this).removeClass('highlight');
>                $('table.twtable tr:even').addClass('evenRow');
>        })
> });
> })(jQuery);
> </script>
>
> Note: I tried just removing the script tags and tagging a tiddler with
> systemConfig - and the highlighting did not work . . .
>
> Thanks,
>
> Mike
> >
>



-- 
http://www.multiurl.com/g/64

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to