How to pass variables to an anonymous function. I want to pass few variables to an anonymous function, based on the function, it will create a new string. In this code, i want to pass url, timestamp, id and plan.
<script>
jQuery(document).ready(function() {
console.log("check")
var newUrl=url+'?id='+id+'×tamp='+timestamp+'&plan='+plan;
console.log(newUrl);
createStoryJS({
type: 'timeline',
width: '1250',
height: '240',
source: newUrl,
embed_id: 'my-timeline'
});
});
</script>