jquery context menu and simple tree

I am having troubble with getting the context menu to work with the simple tree.
It will work after the second right click has been made.

How can i make this work on the first right click?

I think it will be something todo with enabling context menu first and re-enabling when the click is made.
$('.content_Text_files').load('ajax/webpage_manage_load.php', function(){
	simpleTreeCollection = $('.simpleTree').simpleTree({
		autoclose: false,
		drag: false,
			thisClick = $('span:first',node).parent().attr('id');
			  widgetClicksLoad('widgets/ajax/load_list.php?pageID='+ thisClick)
		$('span:first',node).contextMenu({menu: 'myMenu'}, function(action, el, pos) { 

Open in new window

Who is Participating?
jimbinhoConnect With a Mentor Author Commented:
The key is

          $('.simpleTree span').contextMenu({menu: 'myMenu'}, function(action, el, pos) {

Thanks for the help! :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.