Jump to content

need help on this


rolo

Recommended Posts

so on an smf forum i want to add a scrollTo javascript code to an anchor tag and since i don't know php can't figure it out since it breaks the syntax

 

here's the anchor tag i wish to add with the html/javascript:

 

<a href="#top"  onclick="$.scrollTo( '#top', 900 ); return false;" title="Back to Top">Back to Top</a>

 

 

to this div:

 

echo '			
      </div>
	   <div id="copyright">
		<span class="backtop">   <A HREF GOES HERE> </A>   </span>
	   </div>
      </div>';

 

i will greatly appreciate your help on this, thanks in advance  ;D

 

Link to comment
https://forums.phpfreaks.com/topic/229497-need-help-on-this/
Share on other sites

that's not a lot to work with...

 

try this:

echo '			
      </div>
	   <div id="copyright">
		<span class="backtop">'."<a href=\"#top\"  onclick=\"$.scrollTo( '#top', 900 ); return false;\" title=\"Back to Top\">Back to Top</a>".' </span>
	   </div>
      </div>';

Link to comment
https://forums.phpfreaks.com/topic/229497-need-help-on-this/#findComment-1182417
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.