I have a javascript stylechanger which changes layout from wide to boxed version and changes colors and patterns in my pages.
now I have 4 types of to top buttons and want to add it to this changer.
my totop class is ".totop" and it's ids is "#v1", "#v2", "#v3" and "#v4".
how can I touch the codes below to change to top button via style changer?
the hole javascript code is this:
You want the to top button styled based on your current body class like 'wood'? That would be possible in css as mentioned... like .wood #v1 { display:none; } maybe? Also your JS is very repetitive :P Allow me to rewrite it (be right back!)
Hello to everyone!
I have a javascript stylechanger which changes layout from wide to boxed version and changes colors and patterns in my pages.
now I have 4 types of to top buttons and want to add it to this changer.
my totop class is ".totop" and it's ids is "#v1", "#v2", "#v3" and "#v4". how can I touch the codes below to change to top button via style changer? the hole javascript code is this:
http://cdpn.io/awAgh
I think it can be done by a javascript coder.
I will wait again for your help.
thanks!
Your pen has no HTML or CSS...is this intentional?
http://codepen.io/AlirezaM/pen/awAgh
I have very little skills in JS but it seems to me that this could all be done with a css stylesheet switcher.
I have one at home (out now) that gives the body a new class with each style. So you can cascade the css and have multiple styles. Ill post it later
You want the to top button styled based on your current body class like 'wood'? That would be possible in css as mentioned... like
.wood #v1 { display:none; }maybe? Also your JS is very repetitive :P Allow me to rewrite it (be right back!)http://codepen.io/CrocoDillon/pen/ndCbs
There it is :) Couldn't get the cookie plugin to work.
thanks you very much. now it's working.