I am creating cookie using jquery, please see below code:
var divID = $(link).next(\".open-block-holder\").find(\"div:first\").attr(\"id\");
$(\'#panelOpen\'
That is because there is a fundamental difference between a cookie created in a normal HTTP session and a cookie created in an HTTPS session. The latter is encrypted much like the connection as well (because it would be a giant security hole if your connection is encrypted but any data stored on your machine weren't)
I have 2 suggestions, one which might not work:
1) Use the cookie call like this (provided you're using the one I'm familiar with)
$.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
And try to set the domain to https (creating 2 cookies, one for http, one for https) or by trying the "secure" flag, true/false etc. Or
2) Use jQuery's AJAX ability to create a user session in PHP (http://www.reynoldsftw.com/2009/03/using-jquery-and-ajax-to-create-php-sessions/) which then should maintain the "panelOpen" div by way of either opening it up once it reloads in the document.ready call or in the code itself... also making sure to set the https cookie again.