We help IT Professionals succeed at work.
Get Started

how do I use jquery cookie for toggle layer

boxhedge asked
Last Modified: 2013-11-11
Hi I have a question open elswhere regarding this but an answer has been hinted at without a solution being presented.

It appears I need to create a cookie handled by jquery to keep a toggled layer open on refresh and therefore allow a form inside it to return validation or success messages on submit.

Original question here: https://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/JavaScript_Frameworks/Q_27530824.html#a37419979

My question is how to I do this in my jquery and do I need to do anything to make sure the form doesn't refresh on submit (which originally loading on the toggle layer being opened), see here:
<script language="javascript" type="text/javascript">
// -->
$(document).ready(function() {
// hides the slickbox as soon as the DOM is ready (a little sooner that page load)
// shows and hides and toggles the slickbox on click
$('#topPanelHandle').click(function() {
return false;

var panelDuration = 150; //time in miliseconds
var panelJumpHeight = "0.45em";

      $('#topPanelHandle').hover(function() {
          $(this).animate({ 'padding-top': 12, bottom : "-="+panelJumpHeight }, panelDuration);
          $('img.topPanelImg').animate({ top : "-10px" }, panelDuration); 
      }, function() {
          $(this).animate({  'padding-top': 2, bottom : "-20px"}, panelDuration);
          $('img.topPanelImg').animate({  top : "-20px"}, panelDuration);

      $("#topPanel div.wrap").load("ee.php");  
    effect: 'slide_left',
    skin: 'skin7',
    position: 'top'


Open in new window

p.s not all jquery refers to the toggle layer but I'm showing you what I have already set.
Watch Question
Top Expert 2011
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE