Hi guys!
I need a help. I tried to change the default zoom of a gantt view to show months instead of days with two scripts:
First attempt:
<script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><script type="text/javascript">
$(document).ready(function () {
var count = 0;
setInterval(function () {
if (count < 2) {
for (var i = 0; i < 2; i++) {
if (WebPartWPQ2_JSGridController != null) {
WebPartWPQ2_JSGridController.ZoomOutGantt();
count++;
}
}
}
}, 100);
});
</script>
Second attempt:
<script src="indicate jquery.js location here" type="text/javascript">$(function(){
setTimeout(function(){
for (var i = 0; i < 3; ++i) WebPartWPQ2_JSGridController.ZoomOutGantt()
}, 2000)
})
</script>
I added a Content Editor Web Part and past a script in the Source Editor (HTML Source), but nothing has changed.
There anything else that I have to do?
Thanks!