I am writing JavaScript like that:
<?php $this->headScript()->captureStart();?>
$(function(){
// some javascript magic
});
<?php $this->headScript()->captureEnd(); ?>
But problem is that it is not highlighted and there is no autocomplete... I have tried write like this:
<?php $this->headScript()->captureStart();?>
//<script>
$(function(){
// some javascript magic
});
<?php $this->headScript()->captureEnd(); ?>
Now it is highlighted but netbeans is not happy about not closed <script>
tag and some other issues with Zend... Then after some more googling found this:
<?php if( false ) {?><script><?php } ?>
$(function(){
// some javascript magic
});
<?php if( false ) { ?></script><?php } ?>
Works fine but maybe there is better solution for this?