How to use jQuery to hide things

5 views
Skip to first unread message

Colm

unread,
Nov 3, 2010, 1:03:08 PM11/3/10
to ccTiddly
Hello,

I'd liek to know what is wrong with the following method of trying to
hide/show parts of the tiddlywiki based on whether a user is logged on
or not.
Something along the lines of the following in a tiddler tagged as
systemConfig ( e.g zzTweaks to get loaded last)

if(config.options.txtUserName != "admin") {
jQuery('.toolbar').hide();
}

Can someone explain what is wrong with that ?

Best regards / Colm

simon mcmanus

unread,
Nov 4, 2010, 9:18:38 AM11/4/10
to ccti...@googlegroups.com
I think there is an isLoggedIn() function that you could use. I may be wrong - im not looking at any code.

Does the jQuery hide command work in firebug?

Thanks

Simon




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




--
Simon McManus

blog : http://simonmcmanus.com

Kashgarinn

unread,
Nov 4, 2010, 12:01:07 PM11/4/10
to ccTiddly
the wiki already hides the backstagearea if you're not an admin (I
think), you can try and hunt down the code for that and see if it's
any different than what you're trying.

S.

whatever

unread,
Nov 8, 2010, 5:14:48 PM11/8/10
to ccTiddly
Try Tobi's SimpleRolesPlugin (1). It works nicely in a TiddlyWiki, but
when coupled with the login of ccTiddly, it's actually pretty secure.
I tried it out and I was able to completely lock down what certain
users can see or do.
w

(1) http://tobibeer.tiddlyspace.com/#SimpleRoles
Reply all
Reply to author
Forward
0 new messages