[tw] Script to add class to lists

7 views
Skip to first unread message

Mike

unread,
Apr 24, 2010, 10:02:21 AM4/24/10
to TiddlyWiki
<script>jQuery('ul li').addClass('custom');</script>

I would like to add the class of custom to lists
I.E.
*Item1
*Item1
*Item1
*Item1

Any Thoughts on where I am going wrong. . .

Mike

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

Mike

unread,
Apr 24, 2010, 10:12:33 AM4/24/10
to TiddlyWiki
This works. . .
<script>jQuery("ul").addClass("highlight");</script>
But it adds the class to all lists (not just the containing tiddler)
If I switch highlight for custom, it does not work

I added !important to the custom class, no change. . .

StyleSheet
.custom ul {
list-style: none !important;
}
.custom ul li:before {
content: "↕ \0020" !important;
}


Thoughts?,
Message has been deleted
Message has been deleted

Mike

unread,
Apr 24, 2010, 1:57:03 PM4/24/10
to TiddlyWiki
<script>jQuery("div.viewer").addClass("custom");</script>

Works as desired (as far as I can tell . . .)

Mike
Reply all
Reply to author
Forward
0 new messages