Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having trouble using woth foreach loop in php #337

Open
YAseerALy opened this issue Dec 3, 2021 · 1 comment
Open

Having trouble using woth foreach loop in php #337

YAseerALy opened this issue Dec 3, 2021 · 1 comment

Comments

@YAseerALy
Copy link

YAseerALy commented Dec 3, 2021

Each iworking fine with html code..but when uses same class in php loop never get it to work

<script type="text/javascript"> $('.d24').each(function(){ var timee = $(this).val(); $(this).countdown(timee, function(event) { $(this).val(event.strftime('%w weeks %d days %H:%M:%S')); }); }); </script>
@darkcavalry
Copy link

use update.countdown method;

$('.d24').each(function(){

var timee = $(this).val();
$(this).countdown(timee).on('update.countdown', function(event) {
$(this).val(event.strftime('%w weeks %d days %H:%M:%S'));
});

});

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

No branches or pull requests

2 participants