Get the id of the current selector element
Hello,
I need to get the attribute id of the current element which comes from a selector. As I found out with the help of this forum I need to use $(this).attr("id").
Unfortunately this just returns "undefinied" for me. Does anybody have an idea why this doesn't work?
This is my complete code:
- $(".element").editInPlace({
url: ('/elements/' + $(this).attr("id"))
});