[jQuery] some basic questions
Hello,
I am getting confused by what are likely simple things with regard to
Jquery.
For instance:
I have a tabbed page using jquery themes with the tabs structured as
<li>s. The first tab has a form that you can fill out.
The second tab, when clicked is supposed to bring up a summary of your
form and offer a submit button.
So, I thought it would be easy to simple have a click function event
on the 2nd tab that would just take whatever input the user has placed
in the form and copy it to a more condensed overview version on the
2nd tab div.
to make it even simpler the logic I am trying to figure out is:
when tab 2 is clicked
copy the input values from the tab1 form to some div(or spans, or
<td>s) on the 2nd tab view.
$("a:second").click(function () {
$("#data1").text($("input#someData").val());
});
and the html
<li><a href="#tab1"><span>Tab 1</span></a></li>
<li><a href="#tab2"><span>Tab 2</span></a></li>
<div id="tab1">
some data: <input type="text" id="someData" name="someData" />
</div>
<div id="tab2">
<span id="data1"></span>
OR
<div id="data1"></div>
OR
<table><tr><td id="data1"></td></tr><table>
</div>
I guess I am having a hard time figuring out how to access element
text/value attributes...
Beside that problem... can anyone suggest a fairly comprehensive yet
readable starter tutorial for jquery?
Thanks!
E
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home