Skip to content

Instantly share code, notes, and snippets.

@AD7six
Last active December 25, 2015 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AD7six/6915352 to your computer and use it in GitHub Desktop.
Save AD7six/6915352 to your computer and use it in GitHub Desktop.
<head>
...
<script>
APP = <?= json_encode(array('user' => Auth::user())); ?>;
</script>
</head>
<body>
...
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="/js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
<script src="/js/stuff.js">
</body>
$('#FormId select').change(function(){
window.location.assign('/gifts/category/' + $(this).val() + '/' + (APP.user ? APP.user.id : '');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment