XF 1.2 Adding backstretch to Xenforo

Frode789

Well-known member
I've added backstetch to WP, and it works great. So I wanted to do the same in Xenforo.

I've included in PAGE_CONTAINER before </head> this line:
Code:
<xen:require js="/js/jquery/backstretch.js" />

In WP I add the php command in header_functions.php. Where do you do this in Xenforo?
Code:
$.backstretch("/styles/default/xenforo/body-bg.jpg");
 
Last edited:
Use a $(document).ready:

Code:
<xen:require js="/js/jquery/backstretch.js" />
<script type="text/javascript">
$(document).ready(function(){
  $.backstretch("/styles/default/xenforo/body-bg.jpg");
});
</script>
 
Back
Top Bottom