Greetings, I have the following problem. In my asp.net mvc page (which is a partial view) I create an instance of jsTree as follows:
<script type="text/javascript">
$(function() {
$("#industries").tree({
callback: {
onselect: function(NODE, TREE_OBJ) {
$("#SelectedIndustryROWGUID").val($(NODE).attr("id"));
$("#resultMessage").append($(NODE).attr("rel"));
}
},
data: {
type: "json",
async: true,
opts: {
method: "GET",
url: "/CreateMessage/GetIndustries/"
}
}
});
});
this works fine but then, when I click on any link on the page, it does not work. The links are executed when I choose "open in new tab" option from context menu. When I remove the above part, everything is working fine Can someone please help me with this?
EDIT I've changed the code above to be as follows:
<script type="text/javascript">
$(document).ready(function() {
$("#industries").tree({
callback: {
onselect: function(NODE, TREE_OBJ) {
$("#SelectedIndustryROWGUID").val($(NODE).attr("id"));
$("#resultMessage").append($(NODE).attr("rel"));
}
},
data: {
type: "json",
async: true,
opts: {
method: "POST",
url: "/CreateMessage/GetIndustries/"
}
}
});
});
(I've added $(document).ready(function() { ... but it also didn't helped
EDIT2 I also asked this question on jsTree discussion group and I received an answer. Upgrading jquery to version 1.4.2 solved the problem!