Socket
Socket
Sign inDemoInstall

neo-jquery-demo

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    neo-jquery-demo

libreria de javascript para el uso de DOM y ajax


Version published
Maintainers
1
Created

Readme

Source

neo-jquery

libreria de javascript inspirado en Jquery aplicado a las caracteristicas mordenas de ES6+ y api nativas de navegador algunas utilizando funciones

uso de la libreria

el uso puede ser por medio de node o el navegador

// using with electron CJS
const neoJquery = require('neo-jquery'); // full module
const { $id } = require('neo-jquery'); // destructuring

// ES module webpack or electron via ESM or typescript
import neoJquery from 'neo-jquery';
<script src="https://unpkg.com/neo-jquery@1.0.2"></script>

selectors

/* id */
$id('hello-world'); // standalone
const helloWorld = $id('hello-world'); // using variable recommend const
/* based in document.getElementById */

/* query selector */
$selector('hello-world'); // standalone
const helloWorld = $selector('hello-world'); // using variable recommend const
/* based in document.querySelector */

/* query selector all */
$selectorAll('.hello-world'); // standalone
const helloWorld = $selectorAll('.hello-world'); // using variable recommend const
/* based in document.querySelectorAll */

/* body, const variable optional */
const bodyElement = $body;
/* based in document.body */

/* date, const variable optional */
const dateMethods = $date;
/* based Date class */

/* effects */
fadeIn(helloWorld) // using a dynamic classes styles
fadeOut(helloWorld) // using a dynamic classes styles

show(helloworld) // using inline css in js 
hide(helloworld) // using inline css in js 

// https methods
$getJSON('http://jsonplaceholder.typicode.com/users', (data) => console.log(data))
/* $getJSON fucntion using fetch API */

$ajax({
    url: 'http://jsonplaceholder.typicode.com/users',
    type: 'get', // http method
    data: JSON.stringify({
        names: names,
        typedoc: typedoc,
        numdoc: Number(numdoc),
        numtitulada: Number(numtitulada),
        numcomplementarias: Number(numcomplementarias),
        estado: estado,
        certificado: Boolean(certificado)
    }), // from data only in http post | put method
    headers: {
        Accept: 'application/json',
        'Content-Type': 'application/json',
    }, // except http get method
    success(data) {
        console.log(data)
    },
    failed(err) {
        console.error(err)
    }
})
/* $ajax fucntion using fetch API with more callbacks */

/* create elements */
$createElement('p')
const parragram = $createElement('p')

// ready
$ready(() => console.log('loading'))

Keywords

FAQs

Last updated on 20 Dec 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc