(function ($, undefined) {
"use strict";
$.jstree.plugins.replaceIwithA = function (options, parent) {
this.redraw_node = function(obj, deep, callback) {
obj = parent.redraw_node.call(this, obj, deep, callback);
var $node = $(obj).find(".jstree-ocl")
var newNode = $node[0].outerHTML.replace("<i", "<a").replace("i>", "a>")
$node.replaceWith(newNode);
return obj;
};
};
})(jQuery);
Works really good,the expand/collapse works every click.
Havent seen any issues yet and I havnt even changed the css.