Low JavaScript speed on toggle


(unsource) #1

Hello,
I install Piwik on http://highbot.eu .
Now I have a problem with “Readmore” at the news.
Toggle-script:

function Toggle(id) {

  spanid1 = "ToggleRow_"+id;
  spanid2 = "ToggleImg_"+id;
  val = document.getElementById(spanid1).style.display;
  if (val == "none")
  {
    document.getElementById(spanid1).style.display = "block";
    document.getElementById(spanid2).src = "images/icons/collapse.gif";
    document.getElementById(spanid2).alt = "read more";
  }
  else
  {
    document.getElementById(spanid1).style.display = "none";
    document.getElementById(spanid2).src = "images/icons/expand.gif"
    document.getElementById(spanid2).alt = "hide";
  }
}
<a href="java script:Toggle('109_1')"><img alt="read more" src="images/icons/expand.gif" border="0" id="ToggleImg_109_1"> </a>

I have no extra Plugins or Widgets

Sorry for my bad english.

EDIT:
I think that I have a solution.
I past the code bovor
no I put it after


(vipsoft) #2

Chances are your outlinks won’t get tracked.

The problem you had was that Piwik added a click listener on your anchor. I recommend you put the Piwik tracking code back before the tag and use class=“piwik_ignore” on your anchor tag.