timer - Need javascript for buttons to appear/disapear at specific times of day -


i'm working within cms gives limited options - i'm in need of javascript or jquery method create buttons appear 30 minute intervals 5 times per day. complicate matters, times of day change weekend days. i'm beginner coding languages, i'm cornered using them cms.

logically, here's think need do: find day of week (mon-fri leads 1 schedule, sat-sun leads other) find time of day , display if within 30 minutes of trigger time.

any coaching code or approach appreciated. thanks!

var foo=(new date); //get current date foo.getday(); //get current day if(foo>5){ //weekend }else{ //weekday } setinterval(function(){},1000) //run function every second (1000 millisecond) 

i suggest checking minutes of current date @ set interval. if minutes lower 5 or between 30 , 35, show button else, hide button.

$("button").show() $("button").hide() 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -