Best way to use js function in an article

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
Astrofax
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Fri Aug 13, 2010 1:35 pm

Best way to use js function in an article

Post by Astrofax » Mon Apr 30, 2012 12:10 pm

I would like to add the js code below to a Joomla article so on open the article moves to the anchor position.

<script type="text/javascript">

function goToAnchor() {
location.href = "http://www.sp-test.stockpinger.com/inde ... ailyrisers";
}

</script>

This is my anchor - <a name="dailyrisers"></a>

Locked

Return to “Joomla! 1.5 Coding”