This might seem trivial, but I'm new to JS. I have this piece of code:
alert(elementAction);
var argumentsBegin = elementAction.search("(");
var argumentsEnd = elementAction.search(")");
alert(argumentsBegin);
elementAction
is a string. The problem with the code is it doesn't seem to find the parenthesis. The first alert box shows for example:
outer(inner)
But the second one doesn't appear at all. All is cool if I replace () with {}, though. Any thoughts why is this not working for me?