in my html
website I can call any javascript
function through anchor like this
<a href="javascript:function();"></a>
but when I try to add this in wordpress
menu option then after saving menu , everything vanished from there and field becomes empty. how can I call functions through wordpress
Menu’s.
any one can help please ?
It’s hard to say what the problem is without seeing your JS, but you could try this:
Here’s a fiddle: http://jsfiddle.net/BSshG/1/
Or handle the click even with JavaScript and don’t worry about changing the HTML:
Another fiddle: http://jsfiddle.net/BSshG/2/