";$(contentFirstDiv).append(divNote);}); $(conbodyElement).find('task').each(function(index, taskElement) {
var dropDownValue = createDropdDown(taskElement, index); $(contentFirstDiv).append(dropDownValue);
}) $("#main-content-article").append(contentFirstDiv); }); });$(document).ready(function(){$('',{type:'text/javascript', src:'../common/js/app-global.js'}).appendTo('head');$('',{type:'text/javascript', src:'../common/js/main-86836d66ea.js'}).appendTo('head');$('',{type:'text/javascript', src:'../common/js/wp-embed.min.js'}).appendTo('head');$('',{type:'text/javascript', src:'../common/js/app-c59dcedb37.js'}).appendTo('head');}); }, error: function(error) { alert(error); } }); function createDropdDown(element, index) { var task = $(element); var Div = document.createElement('div'); Div.className = "nested1"; var h2_three = "
" + $(task).find('title:first').text() + "
"; $(Div).append(h2_three);var divSection = document.createElement('div'); divSection.className = "section";if(index == 0){var ol = document.createElement('ul');}else{var ol = document.createElement('ol');} $(task).find('step').each(function(index, task2Element) { $(task2Element).find('cmd').each(function(index, cmdElement) { var msgph = ""; $(cmdElement).find('msgph').each(function(index, msgphElement) { if ($(cmdElement).find('msgph').length == 1 || $(cmdElement).find('msgph').length == index + 1) msgph += $(msgphElement).text(); else msgph += $(msgphElement).text() + " " + ">" + " "; }) if ($(cmdElement).find('image').length) { var li = "
" + $(cmdElement)[0].firstChild.data + "
"; } else { if ($(cmdElement).find('msgph').length == 0) var li = "
" + $(cmdElement)[0].firstChild.data + " " + $(cmdElement).find('ph').text() + ' ' + "" + msgph + "
"; else var li = "
" + $(cmdElement)[0].firstChild.data + " " + $(cmdElement).find('ph').text() + ' ' + "" + msgph + "" + $(cmdElement)[0].lastChild.data + "
"; } $(ol).append(li); $(divSection).append(ol); }) }) $(task).find('note').each(function(index, noteElement) { var noteClass = $(noteElement).attr('type') == 'tip' ? 'blue-text' : 'red-text'; var divNote = "
" + $(noteElement).attr('alt') + "
" + $(noteElement).text() + "
"; $(divSection).append(divNote); }) $(Div).append(divSection); return Div; };