Uncaught TypeError: $ .confirm is not a function with Socket

0

I'm doing a shift system with% native% co in which I'm using a php that is called librería in which from the part where the appointment is scheduled works well, since after that saves, shows an alert with the library of fancywebsocket "appointment assigned" up to this point, but the other side where the quote should appear also pretend to show one of the same alerts "You have a new appointment " but this is where the library and this function does not recognize me.

annex the libraries used and the code of the function:

<!-- libreria del servidor socket -->
  <script src='../../functions/jquery-1.7.2.min.js'></script>
  <script src="../../functions/fancywebsocket.js"></script>

  <!-- Este SCRIPT ejecuta todos los alerts -->
  <link rel='stylesheet' href='../../cx/demo/libs/bundled.css'>
  <link rel='stylesheet' href='../../cx/demo/demo.css'>
  <link rel='stylesheet' type='text/css' href='../../cx/jquery-confirm.css'>
  <script src='../../cx/demo/libs/bundled.js'></script>
  <script src='../../cx/demo/demo.js'></script>
  <script type='text/javascript' src='../../cx/jquery-confirm.js'></script>


  <!-- Despliega otra ventana de dialogo interna -->
  <link media="screen" rel="stylesheet" href="../colorbox/colorbox/colorbox.css" />
  <script src='../js/jquery-1.7.2.min.js' type='text/javascript'></script>
  <script src="../colorbox/colorbox/jquery.colorbox.js"></script>

Function from the first side works perfectly, I do not know if any library is interfering with it.

 $.confirm({
              icon: 'fa fa-user-circle-o',
              theme: 'supervan',
              closeIcon: false,
              content: 'TIENES UNA NUEVA CITA!',
              animation: 'scale',
              type: 'green',
              buttons: {
                  'ok': {
                      text: 'OK',
                      btnClass: 'btn-blue',
                      action: function () {
                      }
                  },
              }
          });

If they need the socket code they tell me:

Many thanks in advance ...

    
asked by srJJ 24.08.2018 в 17:25
source

1 answer

1

I found the error ...

<!-- libreria del servidor socket -->

//aqui tengo el jquery de la websocket

<script src='../../functions/jquery-1.7.2.min.js'></script>
  <script src="../../functions/fancywebsocket.js"></script>

  <!-- Este SCRIPT ejecuta todos los alerts -->
  <link rel='stylesheet' href='../../cx/demo/libs/bundled.css'>
  <link rel='stylesheet' href='../../cx/demo/demo.css'>
  <link rel='stylesheet' type='text/css' href='../../cx/jquery-confirm.css'>
  <script src='../../cx/demo/libs/bundled.js'></script>
  <script src='../../cx/demo/demo.js'></script>
  <script type='text/javascript' src='../../cx/jquery-confirm.js'></script>


  <!-- Despliega otra ventana de dialogo interna -->
  <link media="screen" rel="stylesheet" href="../colorbox/colorbox/colorbox.css" />

//y aqui tenia el mismo jquery de la otra libreria
  <script src='../js/jquery-1.7.2.min.js' type='text/javascript'></script>
  <script src="../colorbox/colorbox/jquery.colorbox.js"></script>

What happened was that I read it the first time and if I recognized it, but then I read it again and it was not reachable anymore, so it's like this:

  <!-- libreria del servidor socket -->
  <script src='../../functions/jquery-1.7.2.min.js'></script>
  <script src="../../functions/fancywebsocket.js"></script>

  <!-- Despliega otra ventana de dialogo interna -->
  <link media="screen" rel="stylesheet" href="../colorbox/colorbox/colorbox.css" />
  <!-- <script src='../js/jquery-1.7.2.min.js' type='text/javascript'></script> -->
  <script src="../colorbox/colorbox/jquery.colorbox.js"></script>

  <!-- Este SCRIPT ejecuta todos los alerts -->
  <link rel='stylesheet' href='../../cx/demo/libs/bundled.css'>
  <link rel='stylesheet' href='../../cx/demo/demo.css'>
  <link rel='stylesheet' type='text/css' href='../../cx/jquery-confirm.css'>
  <script src='../../cx/demo/libs/bundled.js'></script>
  <script src='../../cx/demo/demo.js'></script>
  <script type='text/javascript' src='../../cx/jquery-confirm.js'></script>

Maybe this will work for future programmers in Search of errors. Sometimes it only depends on the order and execution of bookstores

Thanks to @TheVicious your opinion helped me a lot to solve it

    
answered by 24.08.2018 в 17:44