Try using below code in your xml file
<layout> <default> <!--Root/Default Layouts--> <!--CSS and JS Files--> <reference name="head"> <!--Add CSS and JS, skin Folder--> <!-- add global JS functions library --> <action method="addItem"><type>skin_js</type><name>min/global-min.js</name></action> <!-- Link to external JavaScript file (e.g Jquery CDN) --> <block type="core/text" name="google.cdn.jquery"> <action method="setText"> <text><![CDATA[<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>]]></text> </action> </block> </reference> </default> </layout>
You can replace the jQuery source, with the version you require.
Since local.xml is loaded at last by the magento, so the xml mentioned there are merged at last. That may be the reason that your load order is not working as you desire.
Alternatively, you can override the Mage_Page_Block_Html_Head::getCssJsHtml() method and play with it.
Moreover, you can try the params element, with name attribute in it, Magento will sort in ascending order:
<action method="addJs"><!-- this will be shown second --> <script>prototype/javascript1.js</script> <params><![CDATA[name="js002_second"]]></params> </action> <action method="addJs"><!-- this will be shown first --> <script>prototype/javascript2.js</script> <params><![CDATA[name="js001_first"]]></params> </action>
Mage_Page_Block_Html_Head $_data; holds the array of items so I you can filter it but default methods does not allow defining order of added items.
Again if you're working with core/text block, you can use before/after to define your load order. For example:
<layout> <default> <reference name="head"> <block type="core/text" name="google.cdn.jquery"> <action method="setText"> <text><![CDATA[<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><script type="text/javascript">jQuery.noConflict();</script>]]> </text> </action> </block> <block type="core/text" name="normalize.cdn.css"> <action method="setText"> <text><![CDATA[<link rel="stylesheet" href="http://css.cdn.tl/normalize.css">]]> </text> </action> </block> <block type="core/text" name="bootstrap.cdn.css"> <action method="setText"> <text><![CDATA[<link rel="stylesheet" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css">]]> </text> </action> </block> <block type="core/text" name="bootstrap.custom.css"> <action method="setText"> <text><![CDATA[<link rel="stylesheet" href="http://kokorugs.com/online-carpet-store/skin/frontend/kokorugs/default/css/bootstrap.css">]]> </text> </action> </block> <block type="core/text" name="layout.custom.css"> <action method="setText"> <text><![CDATA[<link rel="stylesheet" href="http://kokorugs.com/online-carpet-store/skin/frontend/kokorugs/default/css/layout.css">]]> </text> </action> </block> <block type="core/text" name="css.custom.css"> <action method="setText"> <text><![CDATA[<link rel="stylesheet" href="http://kokorugs.com/online-carpet-store/skin/frontend/kokorugs/default/css/styles.css">]]> </text> </action> </block> <block type="core/text" name="javascript.custom.js"> <action method="setText"> <text><![CDATA[<link rel="stylesheet" src="http://kokorugs.com/online-carpet-store/skin/frontend/kokorugs/default/js/script.js">]]> </text> </action> </block> </reference> </default> </layout>
Hope it helps.