cancel
Showing results for 
Search instead for 
Did you mean: 

Popup reminder with jQuery

Popup reminder with jQuery

 Hello, 

 

I am writing here because I could not find anywhere on the internet any instructions on how to write jQuery using Magento. I am a complete beginner with all this. I have applied for a part time internship and the company is testing my abilities in working with Magento. I have the following task and no clue where to start from: 

" Make a smart popup reminder.
Use any open source libraries (e.g. jQuery, jsCookie) to develop a frontend solution on top of your Magento webshop. The popup has to appear 5 seconds after the page loads, but only if the visitor is looking at the website (e.g the tab is active). The popup can only appear once for a visitor, even if he/she reloads the website many times. You can use cookies, so it would 'remember' that it was shown to the visitor before. Try to style the popup yourself, include some content, and a close button as well. "
 
Where exactly should I write this code, in CMS -> pages -> home page -> content -> show editor? Or is there another way to write code and make this thing I was asked for? Cat Sad 
 
Kind regards, 
Aurora Brignola 
2 REPLIES 2

Re: Popup reminder with jQuery

I'm pretty sure you can achieve it without writing a single line of PHP code. You can write html / javascript / css to CMS Page Content area (you need to turn off WYSIWYG editor first though). You can use Google repository to load jQuery and run jQuery.noConflict() as otherwise it'll conflict with Magento built in Prototype framework.

Tanel Raja

Re: Popup reminder with jQuery

First thing you'll have to research since you are using jquery alongside prototype is to enable jquery noconflict so they won't mutually explode. Otherwise the cart functions go south.