html - jQuery link not fired -


i trying load ajax content, whenever click on link jquery not respond.

heres html jquery

<!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <title>title</title> <link rel="stylesheet" type="text/css" href="e3.css">    <script type="text/javascript" src="js/jquery.js"></script>   <script type="text/javascript"> $.ajaxsetup ({     cache: false }); var ajax_load = "<img src='img/site/loader.gif' alt='loading...' />";  //  load() functions  $(document).ready(function()     {         $("#omta").click(function()     {     var loadurl = "fomt.php";      $("#usr")         .html(ajax_load)         .load(loadurl, "fid=<?php echo $fid;?>");     }  ); ); </script>  </head>   <body>  <div id="page">  <div id="content">     <div id="up">         <div id="tab">               <ul id="tabmenu">             <li id="anm" class="tbs blue"><a href="#"><span>anm</span></a></li>             <li id="kom" class="tbs blue"><a href="#"><span>kom</span></a></li>              <li id="omt" class="tbs blue"><a href="#usrl" id="omta"><span>omt</span></a></li>             <li id="sts" class="tbs blue"><a href="#"><span>sts</span></a></li>           </ul>     </div>      <div id="usrp">         <a name="usrl"></a>         <div id="usr">             hans         </div>     </div> </div>  </div>  <div id="bottom">  </div> </div>  </body> </html> 

but when click on the omt link id omta nothing happends.

i have tried

$("a#omta").click(function() 

make link class , tried

$(".omta").click(function() 

and

$("a.omta").click(function() 

but none of helped.

use this.. have missed closing brace } ..

$(document).ready(function() {     $("#omta").click(function() {         var loadurl = "fomt.php";         $("#usr")             .html(ajax_load)             .load(loadurl, "fid=<?php echo $fid;?>");     }); }); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -