www.webdeveloper.com
Results 1 to 3 of 3

Thread: Replace stylesheet source bookmarklet

  1. #1
    Join Date
    Apr 2007
    Posts
    11

    Arrow Replace stylesheet source bookmarklet

    I design a lot of websites, and when it's time to preview them to others without actually do the changes to the website, it would be nice to have a bookmarklet i could send to those who would like to see the changes. So if they click the bookmarklet, the href value in
    HTML Code:
    <link type="text/css" rel="stylesheet" href="style.css" />
    gets replaced with something i have specified.


    I have this one, but it doesn't work:
    Code:
    javascript:(function(){var style=document.getElementById('style');style.href='http://wroug.com/brokenstones/brokenstones.css';})();
    Can anyone help me with this?
    Last edited by mofle; 02-11-2009 at 02:43 PM.

  2. #2
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    change
    Code:
    <link type="text/css" rel="stylesheet" href="style.css" />
    into
    Code:
    <link type="text/css" rel="stylesheet" href="style.css" id="style" />
    and it will probably work

  3. #3
    Join Date
    Apr 2007
    Posts
    11
    I don't have access to the HTML, so I can't change it.

    I need to change the javascript.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles