Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

91
Vistas
Agregar un método a la biblioteca JQuery

Lucho (mucho) en algo fácil.

Quiero agregar esta biblioteca "JQuery Ortodoxo View Engine" (también conocido como JOVN) a JQuery. Ver: https://github.com/JocaPC/jquery-view-engine

En resumen: The Lib agrega un nuevo método a JQuery que puede seleccionar algo de JSON y representarlo en ETIQUETAS HTML que tienen un cierto nombre de clase. Para hacerlo, tengo que importar jquery (instalado con NPM) y esta biblioteca JOVN (localmente, el paquete NPM no existe)

 import jQuery from 'jquery'; import './jovnLib';

Pero jovnLib.js es así:

 (function($) { $.fn.view = function (obj, options) { if (!(typeof obj == 'object')) { ... } function loadSelect(nSelect, aoValues, name) { ... } function setElementValue(element, value, name) { ... } function bind(data, domNode, name) { ... } function init(placeholder) { ... } var defaults = { ... }; properties = $.extend(defaults, options); return this.each(function () {}); }; })(JQuery);

Entiendo que esta importación tiene efectos secundarios y necesito encontrar cuándo se ejecutará, la variable global jQuery, y tengo el error:

 Uncaught ReferenceError: jQuery is not defined (for the last line of JOVN Module)

¿Puedo esperar a importar o usar window.load = () ... Gracias.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda