diff --git a/fhem/www/pgm2/fhemweb.js b/fhem/www/pgm2/fhemweb.js index 3806289c9..d18ff22e3 100644 --- a/fhem/www/pgm2/fhemweb.js +++ b/fhem/www/pgm2/fhemweb.js @@ -295,16 +295,20 @@ FW_jqueryReadyFn() return; $("#devSpecHelp").remove(); var sel = this; - FW_getHelp(m[2], function(data) { + FW_getHelp(m[2], function(data) { // show either the next or the outer li $("#content") .append("
"); $("#content > #workbench").html(data); var aTag = $("#content > #workbench").find("a[name="+val+"]"); - - if($(aTag).length && $(aTag).next("li").length) { - $(sel).closest("div[cmd='"+m[1]+"']") - .after('') - $("#devSpecHelp").html($(aTag).next("li").html()); + if($(aTag).length) { + var liTag = $(aTag).next("li"); + if(!$(liTag).length) + liTag = $(aTag).parent("li"); + if($(liTag).length) { + $(sel).closest("div[cmd='"+m[1]+"']") + .after('') + $("#devSpecHelp").html($(liTag).html()); + } } $("#content > #workbench").remove(); });