Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save ptrnov/a844aeb8467117aaf5986f343ddf1093 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);
//.. your code
}
},100);
});
});
",$this::POS_READY);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment