Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var ids = [];
- $('#buttons').on('click','.allow',function(){
- console.log('clicked', $(this));
- ids.push($(this).attr('id'));
- setTimeout(
- function()
- {
- console.log(ids);
- }, 1000);
- });
- $('#both').on('click', function(){
- triggerBoth();
- });
- function triggerBoth(){
- first = $('#first');
- second = $('#second');
- first.addClass('allow');
- first.click();
- first.removeClass('allow');
- second.addClass('allow');
- second.click();
- second.removeClass('allow');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement