yeahz Posted December 6, 2010 Report Share Posted December 6, 2010 elementāra funkcija negrib strādāt <div class="vote" id="vote-<?=$row['a_id']?>"> <div class="up" onclick="ajaxUpdatePlus(<?=$row['a_id']?>)"></div> </div> <script type="text/javascript"> function ajaxUpdatePlus(id) { $("#vote-"+id).html('content'); } </script> kods atrodas header.php (tiek iekļauts pie katras lapas ielādes) un strādā tad, ja ir atvērts pats sākums - / bet ja ir atvērts kaut kas cits, piemēram /page/4/ tad vairs tā lieta nestrādā, kaut arī kods reāli tur ir. Quote Link to comment Share on other sites More sharing options...
briedis Posted December 6, 2010 Report Share Posted December 6, 2010 Debugo ar firebug, pārbaudi vai toč ir viss. Kļūdu konsolē nekas nav izvadījies? Quote Link to comment Share on other sites More sharing options...
yeahz Posted December 6, 2010 Author Report Share Posted December 6, 2010 lūk ko saka firebug $ is not defined [break on this error] $('#vote-'+id).html('aaa'); Quote Link to comment Share on other sites More sharing options...
briedis Posted December 6, 2010 Report Share Posted December 6, 2010 (edited) Nu tā, došu hintus. $() vispār skaitās funkcija (jā, dolāra zīme ir legāls funkcijas vārds), ko izmanto jquery. Ja saka, ka funkcija nav definēta, ko tas nozīmē? :) Edited December 6, 2010 by briedis Quote Link to comment Share on other sites More sharing options...
yeahz Posted December 6, 2010 Author Report Share Posted December 6, 2010 tas nozīmē, ka jquery.js fails netiek inklūdots? Quote Link to comment Share on other sites More sharing options...
yeahz Posted December 6, 2010 Author Report Share Posted December 6, 2010 mjā, cik stulba problēma, bet nu tiku galā :D problēma bija tāda, ka biju iekopējis JS folderi ne tur, kur vajadzētu :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.