使用FormWizard试图创建书签相关问题
问题描述:
使用具有10个问题
Jquery的formwizard
林
- 第一个问题
- 第二个问题
- 第三个问题 等所有问题10的方式
我试图cre吃了一边的书签,所以用户可以跳出来的问题与不必按下一个/上一个按钮,但我有一个小问题,试图让它的工作...
下面是如何表单向导奠定了我还没有发布的所有10个问题,因为我不想堵塞这个页面了,但请参见下面的3个问题
<a href="#" id="lnk3" style="color:Black">Go to Question 3</a>
<div id="feedbackform">
<fieldset class="sectionwrap" id="Q1">
<legend>Question 1</legend>
<p>
Which one of this five words means the same as <strong>TIRED</strong>? Write the number in the Answer
Square.</p>
<ol>
<li>LATE</li>
<li>CLIMB</li>
<li>HEAVY</li>
<li>WEARY</li>
<li>SLOW</li>
</ol>
<p style="margin-left:-5%">
<asp:TextBox ID="Q1Answer" runat="server" class="TextBox" />
</p>
</fieldset>
<fieldset class="sectionwrap" id="Q2">
<legend>Question 2</legend>
<p>
One of these numbers is wrong, because is does not follow the regular order of the
other numbers in the row.<br />
<br />
Write the number which is wrong in the Answer Square</p>
<p style="margin-left: 32%">
<strong>2 4 6 8 10 11 14 16</strong>
</p>
<div class="WhiteSpace">
</div>
<p style="margin-left: -5%">
<asp:TextBox ID="Q2Answer" runat="server" class="TextBox" />
</p>
</fieldset>
<fieldset class="sectionwrap" id="Q3">
<legend>Question 3</legend>
<p>
LID is related to BOX as CORK is related to......?<br />
<br />
Write the number of the correct word in the Answer Square.
</p>
<ol>
<li>WATER</li>
<li>LIFE BELT</li>
<li>BOTTLE</li>
<li>TREE</li>
<li>FLOAT</li>
</ol>
<p style="margin-left: -5%">
<asp:TextBox ID="Q3Answer" runat="server" class="TextBox" />
</p>
</fieldset>
</div>
的,你可以看到我在用顶部有一个HREF当用户点击这个即时消息时,lnk3的id试图让formwizard进入问题3.
这是我的Jquery IM即捕获点击链接
$("a[ID='lnk3']").live('click', function()
{
$('#feedbackform>Fieldset>ID=Q3');
});
但可惜它不工作?请裸记formwizard是我确定你已经新四试图创建的jsfiddle但遗憾的是我不能得到它的formwizard插件插件,你可以在这里看到http://www.dynamicdrive.com/dynamicindex16/formwizard.htm
的formqizard任何帮助将是非常的例子理解
答
元件可以直接通过使用它们的ID来选择,使用on
代替live
被弃用,可以尝试offset
和scrollTop
;
$("#lnk3").on('click', function(e){
e.preventDefault();
var t = $('#Q3').offset().top;
$(window).scrollTop(t)
});
㈣只是去尝试,但其给出的“e未定义.....” ????????? –
抱歉没有看到其余的,挂在生病尝试 –
似乎没有做任何事情,我点击链接,什么都没有发生? –