aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Setting CSS clock time from dropbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Setting CSS clock time from dropbox" Watch "Setting CSS clock time from dropbox" New topic
Author

Setting CSS clock time from dropbox

azeez ahmad
Greenhorn

Joined: Feb 28, 2013
Posts: 4
I am trying to set css rotation clock time from dropdown using javascript and Jquery. I have done this work so far http://jsfiddle.net/xJvHA/. But my minute and Hour hand is out of control. Please help as quickly as possible.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11499
    
  16

1) Nobody here cares that you are in a hurry. Please EaseUp (<--click that and read the page)
2) "Out of control" doesn't really tell us anything. Please TellTheDetails (<--click that and read the page)


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61769
    
  67

I took a brief look at the code, and the fact that some of the JS code is showing up in the output means you have a real syntax problem. Open the JavaScript console and fix the code. Obviously it's not going to run correctly with errors.

Also, you say that you are using jQuery, but you're not really. You include it on the page, and then pretty much ignore it. Pages that use jQuery should not be using document.getElementById(); they should be using jQuery to fetch elements. There should be no for loops; you should be using $.each() or each(). And so on...

If you are going to use jQuery, then use jQuery.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
azeez ahmad
Greenhorn

Joined: Feb 28, 2013
Posts: 4
fred rosenberger wrote:1) Nobody here cares that you are in a hurry. Please EaseUp (<--click that and read the page)
2) "Out of control" doesn't really tell us anything. Please TellTheDetails (<--click that and read the page)

Okey, now I know the way to ask the question, thanks.
azeez ahmad
Greenhorn

Joined: Feb 28, 2013
Posts: 4
Bear Bibeault wrote:I took a brief look at the code, and the fact that some of the JS code is showing up in the output means you have a real syntax problem. Open the JavaScript console and fix the code. Obviously it's not going to run correctly with errors.

Also, you say that you are using jQuery, but you're not really. You include it on the page, and then pretty much ignore it. Pages that use jQuery should not be using document.getElementById(); they should be using jQuery to fetch elements. There should be no for loops; you should be using $.each() or each(). And so on...

If you are going to use jQuery, then use jQuery.

You are correct Bear Bibeault. I was doing lots of mistake. And you direct me to right direction. Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You do not stick script tags into the JavaScript section of the fiddle. It is like using an external JavaScript file.
If you want to add an external resource, there are options for that on the left side menu.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting CSS clock time from dropbox