I am having problem with getting parameter from javascript onClick function
title = \"as\"
$(\'
Please don't use inline js (onlick in your html).
See reasons not to use inline js here: https://www.google.com/search?q=Why+is+inline+js+bad%3F
Here's a proper way with jQuery:
var $myElem = $('');
$myElem.click(function() {
pushRight('hello');
});
And it's quite easy even without jQuery:
var myElem = document.createElement('li');
myElem.className = 'item';
myElem.addEventListener('click', function() {
pushRight('hello');
});
Live demo here: http://jsbin.com/uDURojOY/1/edit