html - Jquery dynamic form does not work -


i have try create jquery dynamic using http://jsfiddle.net/pixelentity/aabld/24/ , have created html file. not work means show html page not show dynamic form when click add button. code

<html>  <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>  <script>  jquery(function($) {   var multitags = $("#multi");  function handler(e) {     var jqel = $(e.currenttarget);     var tag = jqel.parent();     switch (jqel.attr("data-action")) {     case "add":         tag.after(tag.clone().find("input").val("").end());         break;     case "delete":         tag.remove();         break;     }     return false;  }  function save(e) {     var tags = multitags.find("input.tag").map(function() {         return $(this).val();     }).get().join(',');     alert(tags);     return false; }  multitags.submit(save).find("a").live("click", handler); }); </script>  <style type="text/css">  form { font-family: helvetica, arial, sans-serif; font-size: 11px; }  form div{ margin-bottom:10px; }  form { font-size: 12px; padding: 4px 10px; border: 1px solid #444444; background: #555555; color:#f7f7f7; text-decoration:none; vertical-align: middle;  }   form a:hover{    color:#ffffff;    background:#111111;     }   #multi label {   margin-left:20px;   margin-right:5px;   font-size:12px;   background:#f7f7f7;   padding: 4px 10px;   border:1px solid #cccccc;   vertical-align: middle;   }    #multi input[type="text"]{   height:22px;   padding-left:10px;   padding-right:10px;    border:1px solid #cccccc;   vertical-align: middle;   }    #multi input[type="submit"]{    margin-left:20px;    border:none;    background:#222222;    outline:none;    color:#ffffff;    padding: 4px 10px;    font-size:12px;    }       </style>     </head>       <body>      <form id="multi">     <div>     <label>tag</label><input class="tag" type="text" name="" type="text" />     <a href="#" data-action="add">add</a>     <a href="#" data-action="delete">delete</a>    </div>     <input type="submit" value="save" >  </form>   </body>   </html> 

` wrong code? can 1 please solve this?

just change jquery version higer version don't use 1.9.1 or higher because 'live' method has been removed.or can change 'live' method 'on' method using jquery 1.9.1 or higher.


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -