Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

90
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!