首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为smartwizard 2.0动态添加子菜单

为smartwizard 2.0动态添加子菜单
EN

Stack Overflow用户
提问于 2012-05-09 22:38:50
回答 1查看 430关注 0票数 3

您好,我正在使用smartwizard 2.0插件,我想知道是否有人可以在这里帮助我。

基本上,我试图在用户单击“某些”按钮时动态添加另一个菜单。我给出了下面的代码。

代码语言:javascript
复制
function add_submenu() {
        var ulid = document.getElementById("ulsub1");
        var newli = document.createElement("li");

        newli.innerHTML = "<a href=\"#step-7\" class=\"done\" isdone=\"1\" rel=\"7\"><label class=\"stepNumber\">7</label><span class=\"stepDesc\">Dy Coupon<br /></span></a>";
        ulid.appendChild(newli);

        var maintab = document.getElementById("stpContainer");
        var newdiv = document.createElement("div");
        newdiv.setAttribute('id', 'step-7');
        newdiv.setAttribute('class', 'content');
        newdiv.setAttribute('style', 'display: block;');
        newdiv.innerHTML = "<h2 class=\"StepTitle\">Dynamic Coupon</h2><table cellspacing=\"3\" cellpadding=\"3\" align=\"center\"><tr><td align=\"center\" colspan=\"3\">&nbsp;</td></tr><tr><td align=\"right\">Hello Name :</td><td align=\"left\"><input type=\"text\" id=\"coupon-8\" name=\"Coupon Name\" class=\"txtBox\"></td><td align=\"left\"><span id=\"msg_firstname\"></span>&nbsp;</td></tr></table>";
        maintab.appendChild(newdiv);
}

我面临的问题是添加的菜单不能根据功能工作。

任何帮助都是非常感谢的。

您可以在此网站http://techlaboratory.net/products.php?product=smartwizard&action=2中找到smartwizard 2.0

EN

回答 1

Stack Overflow用户

发布于 2013-03-13 22:04:46

我可能会迟到,但您应该在添加新菜单后再次尝试调用smartWizard函数。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10518322

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档