P
P
ppskmg2016-07-22 14:28:59
JavaScript
ppskmg, 2016-07-22 14:28:59

2 files only one works $(document).ready(function() how to write otherwise?

<script type="text/javascript" src="js/script.js"></script>
  <script type="text/javascript" src="js/script_cal.js"></script>

both start like this
$(document).ready(function(){
   $("#button-res").click(function(){

how to write so that the second does not block the first?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2016-07-22
@vintello

$(document).ready(function(){
   $("#button-res").click(function(){
         $('#someelement').trigger('vizvat1');
          $('#someelement').trigger('vizvat2');
   });
$('#someelement').bind("vizvat1', function(){
 });
$('#someelement').bind("vizvat2', function(){
 });
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question