MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / _getTarget

Function _getTarget

examples/js/sidebar.js:265–284  ·  view source on GitHub ↗
(id, length)

Source from the content-addressed store, hash-verified

263}
264
265function _getTarget(id, length) {
266 var target;
267 if (length) {
268 if (length === 1) {
269 $("section#sidebar li.active").removeClass("active");
270 target = $("section#sidebar li#iclient_" + id);
271 target.children('ul').show();
272 }
273 if (length === 2) {
274 $("section#sidebar li.active ul.active li").removeClass("active");
275 target = $("section#sidebar li.treeview").children('ul').children('li#' + id);
276 }
277 } else {
278 $("section#sidebar #ul").addClass("active");
279 $("section#sidebar li.active").removeClass("active");
280 target = $("section#sidebar li#" + id);
281 }
282 target && target.addClass('active');
283 return target;
284}
285
286function _selectTarget(target) {
287 if (!target || target.length < 1) {

Callers 1

selectMenuFunction · 0.85

Calls 3

childrenMethod · 0.80
$Function · 0.50
showMethod · 0.45

Tested by

no test coverage detected