• Thursday , 12 October 2017

Change Style Sheet Using Javascript Tutorial CSS Swap Stylesheet

Code Canyon



Lesson Code: http://www.developphp.com/video/JavaScript/Change-Style-Sheet-Using-Tutorial-CSS-Swap-Stylesheet
Learn to change the entire style of your web page with a click using JavaScript that is targeting the href attribute of your familiar link element using the setAttribute method of JavaScript. DEMO: http://www.adamkhoury.com/demo/js_swap_css_stylesheet/

Original source

3d Ocean

Related Posts

23 Comments

  1. Jordicutie iz tha best
    September 26, 2017 at 10:37

    how do i then keep the chosen style when i click to another page

  2. lowheartrate
    September 26, 2017 at 10:37

    How would we us php to create an if statement. Lets say I want to have my page echo "This is the dark theme" when the dark.css is enabled and when the default.css I want it to say "This is the default theme." – Of course using if / else statement(s) but not exactly sure how to check for which css page is enabled on a page.

  3. Rina Carmona
    September 26, 2017 at 10:37

    THANKS A LOT!

  4. Saifuddin Makati
    September 26, 2017 at 10:37

    WOW, you make seemingly impossible stuff to existence.

  5. KoyasuNoBara
    September 26, 2017 at 10:37

    THANK YOU!!!!

    I have been searching for a way to do this for, no joke, three fucking hours. Every single thing I found either didn't work, was overly complicated, or expected me to know things that I don't.

    And yes, I could go through a javascript/css/jQuery/whatever tutorial. If I were making a proper web page, I might actually do that.

    But I'm not. I'm taking various stories I've enjoyed on the internet, putting them into html documents, and creating an index linking to them, so that I can reread these stories even when my internet conks out. The only special thing I wanted to do was have a "light" theme" (white background, black text) and a "dark" theme (black background, white text). That's it.

    Thank you for finally making a simple tutorial so that I can do this.

    BTW, when I was taking a class on Java, I was told camelCase (with the first word all lowercase) was standard, so that's probably why your program does that.

  6. bxyify
    September 26, 2017 at 10:37

    I hate that fucking shit when you make text boxes automatically select the fucking whole text like I am too dump to select what I want to select

  7. V Lakshman
    September 26, 2017 at 10:37

    Hi Nice videos. If I refresh the page its redirecting to the default.css. I needs the css to be work even after the page refresh. Thanks.

  8. Afghanoo
    September 26, 2017 at 10:37

    SO SIMPLE AND EASY THANK YOUUUUUUUUUU ADAM

  9. Nintendan
    September 26, 2017 at 10:37

    This was really useful 😀 Thanks!
    One question though, how do I go about making a cookie to remember the CSS style last selected? If anyone else knows please answer. Pretty newby at this stuff and every other CSS change tutorial I've looked at hasn't worked :[

  10. Gerardo Herrera
    September 26, 2017 at 10:37

    Adam, you save me. Thanks =_)

  11. Al Geddis
    September 26, 2017 at 10:37

    Would have been nice for newbies to see the final result. Like how it actually works in practice.

  12. Stephen Fuller
    September 26, 2017 at 10:37

    This was a great simple tutorial, perfect for what I needed. Like how you present yourself adding in personality without deviating from the topic. Wish I would have found this earlier instead of searching all around for what you just explained. Thank you.

  13. thetechgeneration
    September 26, 2017 at 10:37

    I love how you don't use jquery for the most part in your videos

  14. LA King
    September 26, 2017 at 10:37

    great tutorial, thanks

  15. TheHutch
    September 26, 2017 at 10:37

    Hi Adam, I only just discovered your channel and I like it a lot. You are very clear and fluent. And your vids are good quality / clearer than most because you zomm into the action. Well Done and I look forward to watching / learning more.

  16. cityshots
    September 26, 2017 at 10:37

    Your the best teacher going……Keep It up, you have my support!

  17. Simon L
    September 26, 2017 at 10:37

    i'd really like a video tutorial on the lights down that google did for earth day (this video was great too)

  18. DeadHumorLaz
    September 26, 2017 at 10:37

    Do you know how i can make the stylesheet stuck? cause when i change page, the stylesheet changes back to normal…?

  19. MrShiebas
    September 26, 2017 at 10:37

    good video tutorials. I am searching all your tutorials but could not find a tutorial that allow muliple entries. i am designing a sports system and need to select 11 players for example and when i press submit button it must insert data into database instead of enter it one by one

  20. rhrh0903
    September 26, 2017 at 10:37

    Thanks for your tutorials.

  21. k odu
    September 26, 2017 at 10:37

    This man makes programming such fun. I wish he was my teacher. I have never found programming to be fun. It always looks boring but here it is excting. Thanks and Thanks.

  22. Stephen Vanderwarker
    September 26, 2017 at 10:37

    I love these videos! Great tutorials. Keep em coming 🙂

  23. Gilbert Bigelow
    September 26, 2017 at 10:37

    Really Good tutorials. Great teaching style.

    I am using Dreamweaver CS4 and do not have the camelcase problem as you. The code hint drop down on this computer shows all lowercase where your shows camel. I have tried to force it to camelcase, the help manual says you can, but I have not been able to. I have been able to go all upper or all lower but these are defaults. Dreamweaver has some buggy issues like these I have found. I have had to fresh install to fix some issues in the past.

Leave A Comment

You must be logged in to post a comment.