hi all,

Thang for ragx replay :D, but i still get the same error

this is my code

rating_star.js
$(document).ready(function() {
  var behav = function(){
    $(".rating_class").hover(function(){
      $("#tooltip_star").css({"visibility":"visible",
"top":($(this).offset().top - 60),
"left":($(this).offset().left+$(this).width()+ 2)});
      $.ajax({
        type: "POST",
        url: $(this).attr("href"),
        success: function(msg){
          $("#tooltip_star").html(msg);
        }
      });
    }, function(){
      $("#tooltip_star").css("visibility","hidden");
    }).ajaxStart(function(){
      $("#tooltip_star").html("<table class=\"table_animation\"><tr><td><img
style=\"text-align:center\"
src=\"/resource/images/loading.gif\"></td></tr></table>");
    });

    $(".rating_class").click(function(){
      location = $(this).attr("href").replace("ajax_", "");
      return false;
    });
  }

  behav();
});


in detail.php I am just declare the js sintax like this,
<script src="<?= $base_url;?>resource/j_s/rating_star.js"
type="text/javascript" charset="utf-8"></script>
$('#displayRelated').load("<?= base_url();?>product/related/<?= $idProduct
?>/"+page, function() {
        *behav();*
      });

I m still get error in firebug

*behav is not defined*

there is any wrong with my code?

~ saiful haqqi ~

Reply via email to