title: How to transform "javascript:scrollto('.class');" to an external link (leading to a certain .class on the site from the outside)?
body: <p>I was trying to create a 'one-page-layout' with a smooth scrolling using internal links. This is the code:</p>
  
  <pre><code>function scrollto(element) {
  $('html, body').animate({
      scrollTop: ($(element).offset().top - 40)
  }, 'slow'); };
  </code></pre>
  
  <p>There is a fixed header on the page, therefore the value -40.</p>
  
  <p>The script works perfectly within the site, on which it's implemented. For links I use:</p>
  
  <pre><code>&lt;a href="javascript:scrollto('.link1');"&gt;Go to Link 1&lt;/a&gt;
  </code></pre>
  
  <p>...and 'tag' the divs with classes:</p>
  
  <pre><code>&lt;div class="link1"&gt;
           &lt;h1&gt;This is link no 1&lt;/h1&gt; &lt;p&gt;Text&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here's an example: <a href="http://de-augenblick.de/example/example.html" rel="nofollow">EXAMPLE SMOOTH SCROLLING</a></p>
  
  <p>How can I create a link placed on the other website, that would lead to a specified DIV in the my document? Usually, using the anchors, it would be:</p>
  
  <pre><code>&lt;a href="example.html#link1"&gt;Go to Link 1&lt;/a&gt;
  </code></pre>
  
  <p>but I do not use anchors and don't really have any good experience with them, because of the fixed header.</p>
  
  <p>Is there any way to transform this internal link</p>
  
  <pre><code>"javascript:scrollto('.link2');"
  </code></pre>
  
  <p>so that I could link some DIVS from the 'outside'?</p>
  
  <p>Your help is much appreciated. I've been googling much. Can't find the answer though. I am not an advanced javascript user, so please, be understanding. Thank you.</p>