Wordpress display/hide content based on date/time without refreshing page - javascript

I have searched high and low looking for a plugin or code to show or hide content on a WordPress page based on the date and time without refreshing the page. I can rig something and have the page refresh at a certain time, but the users watching the live stream would see an interruption. It is also hard to find something that works on a recurring basis.
The content also needs to be recurring, so I need something like this: Show text "A" from 11:00 until 13:00 every Sunday and text "B" at all other times. I know this is possible, but I cannot find the right combination of code to make it happen.

Related

Force HTML refresh at certain date ONCE

I am trying to create a forced refresh for all HTML pages + content on a site to occur once at a certain date. For CSS and JS content, this is relatively easy using version control and that's been done, my issue is with HTML pages. I would like to allow the content to be cached once the date has passed. Is this possible? I have tried to look at solutions but what I found would basically then force the user to reload all content again every time they visit the site after a certain date which is not what I am looking for.
Thanks!

Attempting to create a calender with a clock picker built into each day as an ng-click

I understand that this sounds a bit far fetched but i want to build a monthly calendar that when the day is clicked it is routed to another page that then prompts the user to put in a start and end time which the program then calculates the total amounts of hours and assigns it to the original calendar. I have found a few j query plugins however when combined or any of their code is manipulated they both seem to break. If you have any suggestions anything is welcomed. I can upload what i have for code so far but its not really flushed out or good at all.

How can I make a live thread (vidiprinter) type section of my site?

I need to make a section of my site like a vidiprinter stlye thing where I can update it and the page will refresh automatically on the user's device without them having to refresh. Ideally if I could allow other people who I specify to update the thread as well that would be great but is not essential. Is there any way that I can do this? (As simple as possible)
Thanks!
Have javascript check / make an ajax call to some back end page to check for updated. I'd also save the time stamp of the last time the page was updated, and then check if the newest comment / update time stamp is greater than the old time stamp, then update the page either by refreshing the whole page, or by adding the info right there from an an ajax call.

Track 'conversion' based on callback with Google Experiments

I'm looking to set up a Google Analytics experiment where we test two pages and tack if a user clicks one of a set of links (don't really care which one of the set).
However, the links will all go off-site and I was hoping to avoid adding a redirect somewhere in between.
What I'd love to do is have a bit of javascript that's called and is counted as a 'conversion' in the experiment, that way I could call it any time one of the buttons is pressed. I don't really care which button, just looking to track the total.
I'm testing this with the following code on two page:
Tracked Link
This is supposed to correspond to a goal I set up like this:
So far after three hours (and I've been clicking the link) there are no results howing up in the test.

how does gmail retain the checkbox selections from page to page

in gmail if you check mark email 4 then move to different set of 50 or 25 records and mark selection 26 then both 4 and 26 are retained if you move back and forth.
How does google do this?
would it be possible to do something like this in a page that brings only 50 records and when NEXT is clicked...it again goes to DB to bring next set of 50 records.
You don't technically change pages, it's all the same page, the content is just changed dynamically with JavaScript.
Take a close look at the url. Only the hash part of it changes. Which means you don't really load new pages when you click things on Gmail. They just change the elements shown to you with javascript.
Similar thing could be done with page loads if you use localStorage or sessionStorage
You could do the page you're describing with Ajax techniques.
The inner pages are most likely loaded using AJAX. Kind of like iFrames, you monitor the links that are clicked and only load the inner part of what you're after so that you aren't loading things twice...
It's possible that these are saved in JavaScript or Cookies... I would probably store them as a JavaScript array of selected checkboxes personally... depending on how much load you're already giving to the user.

Categories