仅替换div中的文本并使用jquery切换不同的div内容

问题描述:

在jquery代码下面显示

show below jquery code

$(document).ready(function () {
                    $('#prvnote').hide();
      $('#regclass').click(function () {
                     $('#prvnote').toggle(400);
                     $('#newdiv').toggle(400);

   });
 });



显示以下HTML代码此div仅用作菜单




show below HTML code This div only use as menu

<div id="regclass"><span>View Previous Note</span></div>





现在何时我点击上面的div con帐篷然后在div下面将显示和上面的span标签内容替换为Post Note





Now when i clicked on above div content then below div will display and above span tag content replace with "Post Note"

<div id="newdiv"><form>......</form></div>
    <div id="prvnote"><form>......</form></div>





当div(newdiv)显示时然后跨越内容Post Note,当div(prvnote)显示时,span内容必须是View Previous Note



When div(newdiv) show then span content "Post Note" and when div(prvnote) show then span content must be "View Previous Note"

document )。ready( function (){
(document).ready(function () {


' #prvnote')。hide();
('#prvnote').hide();


' #regclass')。点击( function n>(){