dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: javascript show div once per day HELP

Hybrid View

  1. #1
    Join Date
    Nov 2012
    Posts
    2

    javascript show div once per day HELP

    I need script that change specific div to show it only Once per day.(probably with a cookie that expires) this script needs to change style of that div to--->display:block<--- on that time that this div is showen. Now style of that div is position:fixed; bottom:0;z-index: 100; display:none;

    I dont know a thing to code in JS or JQ, so please explain in basic language.

    I am googling 2 days, still cannot find answer...
    Please help
    Thanks

  2. #2
    Join Date
    Mar 2011
    Location
    Rome, Italy
    Posts
    101
    The style of css "position" is not relevant in that case; you need two steps: first, in place of cookies, it could be better a JS date/time function control (in simple words: "IF DAY IS... THEN SHOW THAT") then set a css "display" variable, which could be manipulated by JS, according to the first step.

    BUT you have to learn some basic Javascript language to do that:
    http://www.w3schools.com/js/default.asp
    http://www.w3schools.com/jsref/prop_style_display.asp
    http://www.w3schools.com/js/js_obj_date.asp
    Last edited by MrSnowDrop; 11-21-2012 at 10:29 AM.

  3. #3
    Join Date
    Nov 2012
    Posts
    2
    Hi MrSnowDrop,
    I know that style of css "position" is not relevant, like "z-index" and "bottom" too... I tryed many times to learn the basics of JS, but W3school is not the best place for that, for me... ok I can understand some elements from JS, but the syntax I cannot understnd... Many times I copyed JS code and change it to suit to my needs, but this more complexed, with cookies I cannot understand... Anyway thanks for trying to help me, If someone have solution for my problem, please write it... I will try to search for the code...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles