Two things. First, make sure you enable jQuery since $ () is a jQuery method. This includes something like:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
Secondly, I donβt think you really wanted to pass the variable name and viewport. Rather, you should pass strings, for example:
setOrCreateMetaTag('name', 'viewport', 'width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0');
source
share