A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://stackoverflow.com/questions/19683637/passing-in-script-attributes-data-vars-into-head-js below:

javascript - passing in script attributes (data-vars) into head.js?

is there a way to pass script attributes into the loading javascript via head.js?

for example script we need to load is in original form like this :

<script type="text/javascript" charset="utf-8"
src="script.js"
data-vast-src="adscript.js"
data-post-ad-container="content-div"
data-autoplay="true"
data-width="600"
data-height="400">
</script>

so solution we need is something like this :

head.js("jquery.js", { url: "script.js", charset: "utf-8", data-vast-src: "adcript.js", data-post-ad-container: "content-div", data-autoplay: "", data-width: "600", data-height: "400" }, function() {
}

we have tried this, but it does not work...


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4