i'me new to jquery and what i didn't got is interaction of jquery und js-methods.
i use the jq-plugin jstree.
- $(function () {
$("#async_json_2").tree({
opened : ['sid0'],
ui : {
theme_name : "classic"
},
callback: {
beforedata: function (NODE, TREE_OBJ) {return { parent_id : $(NODE).attr("id") || "NULL" } },...
with
$(NODE).attr("id") i get the value of the attribute 'id', wich is f.e. "sid0". But what I need is only the integer-part of this value so i need "0" in this case. In js i would define something like
...id.replace(/sid/, ''); but
$(NODE).attr("id")
.replace(/sid/, ''); doesn't work.
How do I do s.t. like that in JQ ?
thank you for help an
best,
heinetz