I have an extension in magento which adds a block in the header for loading jQuery:
<reference name="head">
<block type="page/html"
template="csdev/embedjquery/embed_jquery.phtml"
output="toHtml"
name="csdev_embedjquery" />
</reference>
The content of the block is the following:
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js" />
<script type="text/javascript">
$.noConflict();
alert(jQuery);
</script>
The problem is that jQuery will be added too late, after prototype. It needs to added before prototype, so i can execute the noConflict()
function.
Also, since I don't want to overwrite the magento head-template or the magento head-block, I added the following:
output="toHtml"
but that's too late :(...
Is there a solution such as "add this block on top of the reference (head) with output='toHtml'"
?
I tried:
before="-"
but it doesn't seem to work, because I wrote:
output="toHtml"
My Magento Version is 1.7.