Skip to content

Instantly share code, notes, and snippets.

@ptrnov
Created September 20, 2016 17:13
Show Gist options
  • Select an option

  • Save ptrnov/0a4b191dd85d900148252f735fd39550 to your computer and use it in GitHub Desktop.

Select an option

Save ptrnov/0a4b191dd85d900148252f735fd39550 to your computer and use it in GitHub Desktop.
/*
* Triger timeout button triger with timeout.
* @author piter novian [ptr.nov@gmail.com]
*/
$this->registerJs("
$(document).ready(function() {
$('#tab-project-id').click(function(){
setTimeout(function(){
var idx = $('ul li.active').index();
//alert(idx);
if (idx==5){
//alert(idx);
var elem = document.getElementById('calendar_test');
var list = elem.getElementsByTagName('button')[1];
//list.onmouseover = function() {
//list.className='ui-state-hover';
//list.focus();
setTimeout(function(){
list.click();
},100);
}
},100);
});
});
",$this::POS_READY);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment