Commit ba1a5aab by Prem Sichanugrist

Remove unused JavaScript on the page bottom

parent 65ab3c05
......@@ -11,9 +11,10 @@ class @Sequence
bind: ->
@element.bind 'contentChanged', @toggleArrows
@$('#sequence-list a').click @goto
@$('.sequence-nav li a').hover @navHover
buildNavigation: ->
$.each @elements, (index, item) ->
$.each @elements, (index, item) =>
link = $('<a>').attr class: "seq_#{item.type}_inactive", 'data-element': index + 1
title = $('<p>').html(item.title)
list_item = $('<li>').append(link.append(title))
......@@ -45,6 +46,9 @@ class @Sequence
@position = new_position
@element.trigger 'contentChanged'
navHover: (event) =>
$(event.target).siblings().toggleClass("shown")
goto: (event) =>
event.preventDefault()
new_position = $(event.target).data('element')
......
......@@ -7,12 +7,10 @@
</%block>
<%block name="js_extra">
##Is there a reason this isn't in header_extra? Is it important that the javascript is at the bottom of the generated document?
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
<script type="text/javascript">
$(function() {
${init}
});
document.write('\x3Cscript type="text/javascript" src="' +
document.location.protocol + '//www.youtube.com/player_api">\x3C/script>');
</script>
</%block>
......
......@@ -113,7 +113,6 @@
<script type="text/javascript" src="${static.url('js/jquery.leanModal.min.js')}"></script>
<script type="text/javascript" src="${static.url('js/jquery.qtip.min.js')}"></script>
<script type="text/javascript" src="${static.url('js/jquery.cookie.js')}"></script>
<script type="text/javascript" src="${static.url('js/video_player.js')}"></script>
<script type="text/javascript" src="${static.url('js/schematic.js')}"></script>
<script type="text/javascript" src="${static.url('js/cktsim.js')}"></script>
<script type="text/javascript" src="${static.url('js/jquery.scrollTo-1.4.2-min.js')}"></script>
......@@ -121,7 +120,6 @@
document.write('\x3Cscript type="text/javascript" src="' +
document.location.protocol + '//www.youtube.com/player_api">\x3C/script>');
</script>
<%block name="js_extra"/>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment