Results 1 to 3 of 3

Thread: Cookie for Animated Collapsible DIV v2.4

  1. #1
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cookie for Animated Collapsible DIV v2.4

    Hi Guys,

    I use the script "Animated Collapsible DIV v2.4" as Slide-Menu. Everytime I go to an other Side on my page, the Slide-Menu is closing.
    Is it possible to set an Cookie, so the Slide-Menu will always stay open.

    I am really happy if someone helps me!

    Thanks and best Regards

    isleoflife

  2. #2
    Join Date
    Aug 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry for my bad english. I hope you understand?

  3. #3
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    this some cookie script, may be you can add this at your js file,
    Code:
    var setName={
    	getCookie:function(Name){ 
    		var re=new RegExp(Name+"=[^;]+", "i") //construct RE to search for target name/value pair
    		if (document.cookie.match(re)) //if cookie found
    			return document.cookie.match(re)[0].split("=")[1] //return its value
    		return null
    	}
    
    	setCookie:function(name, value){
    		document.cookie = name+"="+value
    	},
    
    
    init:function(config){
    		$(document).ready(function(){
    			var selected=(config.persiststate)? featuredcontentglider.getCookie(config.gliderid) : config.selected
    			config.selected=(isNaN(parseInt(selected))) ? config.selected : selected //test for cookie value containing null (1st page load) or "undefined" string	
    })
    
    }
    i get this script from the contentGliderScript(created by dynamicdrive)
    good luck..

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •