Jump to content

[SOLVED] very simple jquery in theme


Recommended Posts

hi.

I'm trying to insert very simple jQuery code to my theme (header.tpl). But it is not working.

you can see the result on jsfiddle:

http://jsfiddle.net/krzysiekkcn/3YxPD/

 

 

I tried to add script to separate file and add alert inside. And only alert shows up.

 

later I will write my test store address, now,I do not have that on my,phone.

 

 

I hope you will be able to help me. I tried a lot of tips that I found on web, but all of them failed.

 

 

 

 

Link to comment
Share on other sites

No it is not. As you can see this script have to show BOX Message when mouse is over icon.

On JsFiddle it is working, and using Jquery that I found my prestashop is using.

 

Here is my page: http://ns3288244.ip-5-135-179.eu/

But there is not alert in side, and you will see this is not working.

 

But for test I tried to add code like below, to new file, and alert shows up. But message box is still hidden.

alert('this alert box is working');
$(".helpdesk_hint").mouseover(function() {
    $(this).children(".helpdesk_message").show();    
    alert('but this not..');
}).mouseout(function() {
    $(this).children(".helpdesk_message").hide();
    alert('and this not too.');
});

I have no idea. I thought that .mouseover is not so hard for prestashop...

Link to comment
Share on other sites

add this script but with document ready funciton

$( document ).ready(function() {
 alert('this alert box is working');
 $(".helpdesk_hint").mouseover(function() {
 $(this).children(".helpdesk_message").show();
 alert('but this not..');
 }).mouseout(function() {
 $(this).children(".helpdesk_message").hide();
 alert('and this not too.');
});
});
  • Like 1
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...