Ever wanted to load URL params directly from the SRC attribute in your <script> tag? Now you can with jsParam. It does not require any other libraries (like jQuery) to run.
Pass parameters like you would in PHP/ASP/JSP:
<script src=”somefile.js?menu=true&color=green&count=42″ id=”somefile”></script>
Updated May 2, 2016: Now allows you to pass arrays as well as strings, booleans, and numbers.
[snippet id=”4″]
Very clever. I’ve been looking for something like this to impliment code with our customers.
Thanks!