What I want is a function that runs on page load, ad eternum, changing the class of #foo into .bar and into .foobar alternatively, every X seconds.
I have two swf files that I use as headers on our website; one for day, one for night. I am looking for a script that will change these files depending on the time of day the user hits the site based on their computer clock.
Given the following input tag which is enclosed within a hidden div tag:<input id="X" class="Y"/> this call (id-based) locates the tag: $(this).find("#X")but this one doesn't (class-based)I couldn't find any documentation indicating find() working differently when using id-based vs class-based selectors.
how to get the time and date difference? given two time and date with the following format like in textbox A: 2011-05-03 17:35:47.0 and textbox B: 2011-05-03 16:35:47.0 then the output would be: 0 days, 1 hour, 0 minutes, 0 seconds
I do pretty much all the computer related tasks, which includes computer system repair, audio/video editing, cd/dvd printing and duplication, document format and creation, etc etc. But when it comes to HTML (or other codes) I know very little. But we needed a website, so I use Homestead hosting and the Homestead (offline) Site Builder program.
Anyway, inside the sight builder program, they have the option to insert HTML Snippets. Which I use for various objects, off site tools, and other. But now I need to do something for which I have not been able to find a "premade" html code object, that can perform the task desired. I have searched and searched google and went through many sites, including this one. I have tried to take some codes which I thought I could alter to make it perform, but they just wouldn't work for what I needed them to do.
I need a code that will automate a "specific text message" to change daily, and to schedule a "different specific text message" to appear each day. I need to be able to schedule each days "texts" at the very least 31 days in advance. In other words, I need to make an array (I think that's what it is called) for the entire month:
Day 1 "today's text 1" Day 2 "today's text 2" Day 3 "today's text 3"
If were possible to make an "array" that would go six months out (or more) that would be very helpful! But the longest that I have seen is one month at a time, so that may be as long as they go, but I'm not sure.On top of all of this, I need these changes to be performed at a specific time of the day. I would like them to be preformed at sunset everyday, but I don't think there is anyway to direct the code to look at like [URL] sunset times or such. So if I can at least choose a specific hour, like 8:00 pm, that will work, I will just have to adjust this every once in a while.
However, I don't want it to change just at 8:00pm in my timezone. I need it to change at 8:00pm according to the website viewers timezone. Is there a way to make the code "look" at the users computer and "get their time" and use that to adjust what text is displayed? In other words, I live in Indiana USA. If someone in Australia looked up the webpage on the 15th day of the month, but it was 9:00pm Their Time. The text I need to be displayed should be for "Day 16" from the array.
based on selection of radio button, i want to change the text box to enable and disable. And additionally, how to set if i enter a value in textbox1 then calculating something and display the result in textbox2 that to on key up.. not on form submitting.
I'm working on a site for our radio station and want it to load a banner where you can see who the DJ is that is on. I saw code on here yesterday (actually it was from March, but I just found it yesterday and can't today) to do it, it showed two images at different times but I couldn't get it to work and don't know enough about java to add more time slots.
I am trying to make a webpage that will change a picture based on the time. I would like one picture (image2) to display between 8:23 and 2:43 Monday-Friday and another(image1) to display the rest of the time. When I open the file the web browser only displays a blank screen.
I have the two images in the same directory as the html file. Here is the code:
How could I add a class to a div that contains a div that contains a link that contains specific text, and name that class based on that link but with hyphens in place of spaces and all lower case? Here's specifically what I'm looking for:
<div class="my-div-one"> h2>Title of this section</h2> <div class="my-div-something-else"><a href="url">My Special Link</a></div> </div>
In the above example, I want to add the class my-special-link to my-div-one. Is that possible? How could I do that?
I want to change the background of my main div depending on the time of day. Right now this code works for two time of day, day and night but it only works on the "body" tag not on a div. How would i modify it to change a div background rather then the "body" background
I have mulitiple 'a' tags with different classes (aclass1, aclass2, aclass(n)) and I have multiple divs, also with consecutive classes (divclass1, divclass2, divclass(n)). Is there a way to select the 'a' tags to match the div based on its number (ie. 'aclass1' with 'divclass1' and aclass2 with divclass2)? For example something like this:
I'm trying to select a class (.home) and an ID (#something) at the same time,
normally I'd use:
but in this instance, the ID is already stored in a variable called "newpage" - I'm trying the following:
(note, selecting the id on it's own with just$(newpage) does work, so I know the issue isn't with my variable, it's just a matter getting both the class and the variable stored ID selected at the same time)
what i have are 3 radio buttons at top of my form, the first radio option i would like if selected to open a div that contains new questions on the form... then if the other radio buttons are selected they hide that div.
Im assuming that I would just add more else if statements, but not really sure the cleanest way to assign specific dates using this format.
I have a dynamic jCarousel which pulls in JSON data from php, and prints out the list html. What I'm trying to do is set the carousel start item as a variable, which would find the item with the class ".active", and start with that item. The problem is that since the data is dynamic when it looks for the start item, the list hasn't yet been rendered, therefore doesn't find any class or list data. The code below works with a static list, but not dynamic. I think my options are (a) wait for carousel to load, then somehow set the "start" item after, or (b) after list loads auto-scroll to the item with class ".active".