Skip to content
This repository has been archived by the owner on Apr 2, 2019. It is now read-only.

running multiple occasions (same theme) #35

Closed
stovepot opened this issue Nov 11, 2013 · 1 comment
Closed

running multiple occasions (same theme) #35

stovepot opened this issue Nov 11, 2013 · 1 comment

Comments

@stovepot
Copy link

I would like to run 4 occasions of .odometer on the same page - only with different results e.g.: 1223 | 100029 | 272728 | 8282

How would you write the init?

setTimeout(function(){
$('.odometer').html('1223');
}, 1000);

@zackbloom
Copy link
Contributor

You need to give them unique selectors. You can select them any way that jQuery can, by classname, id, etc.

For example:

<div class="odometer moon-odometer"></div>
<div class="odometer earth-odometer"></div>
$('.moon-odometer').html('4342');
$('.earth-odometer').html('543343');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants