Jump to content

[SOLVED] when insert function() in header.tpl, prestashop crashes? why?


Recommended Posts

I need insert this to my header.tpl

script type="text/javascript"
$(function() {
   $("a[rel]").overlay({
       expose: 'darkred',
       effect: 'apple',
       onBeforeLoad: function() {
           // grab wrapper element inside content
           var wrap = this.getContent().find(".contentWrap");
           // load the page specified in the trigger
           wrap.load(this.getTrigger().attr("href"));
       }
   });
});

/script



when I do, appears all white?
what happen with this code?

thank you very much

Link to comment
Share on other sites

try that:

{literal}
[removed]
<!--
$(function() {
$("a[rel]").overlay({
expose: 'darkred',
effect: 'apple',
onBeforeLoad: function() {
// grab wrapper element inside content
var wrap = this.getContent().find(".contentWrap");
// load the page specified in the trigger
wrap.load(this.getTrigger().attr("href"));
}
});
});

//-->
[removed]
{/literal}

Link to comment
Share on other sites

try that:

{literal}
[removed]
<!--
$(function() {
$("a[rel]").overlay({
expose: 'darkred',
effect: 'apple',
onBeforeLoad: function() {
// grab wrapper element inside content
var wrap = this.getContent().find(".contentWrap");
// load the page specified in the trigger
wrap.load(this.getTrigger().attr("href"));
}
});
});

//-->
[removed]
{/literal}



Yes, with {literal} works fine
thank you v.much
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...