• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help,, how to multiple jquery function on one page

#1
[eluser]wahmal[/eluser]
i have problem with multiple jquery function. If I change the menu's, autocomplte and datepicker function not working, only navigation fungtion. But if i refresh the page on the menu that I'd change, all functions working. what's worng? this my code :

#2
[eluser]wahmal[/eluser]
this my code :

Code:
<!--Jquery NAVIGASI-->
[removed][removed]
[removed][removed]
[removed][removed]
<!--CSS NAVIGASI-->
<link href="<?php echo base_url(); ?>atribut/navigasi/demo.css"  rel="stylesheet" type="text/css" >
<!--CSS TEMPLATE-->
<link href="<?php echo base_url(); ?>atribut/style.css"  rel="stylesheet" type="text/css" >
<!--Jquery auto serach-->
[removed][removed]
[removed][removed]
<link rel="stylesheet" href="<?php echo base_url(); ?>atribut/jquery/themes/base/jquery.ui.all.css" type="text/css" media="all" />
[removed][removed]
[removed][removed]
        [removed]

        function cari(){
            $("#nyari").autocomplete({
                minLength: 1,
                source:
                function(req, add){
                    $.ajax({
                        url: "<?php echo base_url(); ?>index.php/Cautocomplete/lookup/",
                        dataType: 'json',
                        type: 'POST',
                        data: req,
                        success:
                        function(data){
                            if(data.response =="true"){
                                add(data.message);
                            }
                        }
                    });
                }
            });
        }
$(function() {
  $( "#tanggal" ).datepicker({
   changeMonth: true,
   changeYear: true,
   showButtonPanel: true,
   dateFormat:"yy-mm-dd"
  });
});
     [removed]


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.