Light
Back
  1. jQuery (utility)

Tags

Extension
Nova 2

jQuery (utility)

Version 1.0

Reviews

0.0 out of 5 stars

NOTE: Because of formatting issues on the Xtras site, this README may be better viewed at: https://github.com/jonmatterson/nova-ext-jquery

This extension provides a helper for writing jQuery selectors. It's intended as a utility for extension writers and does not provide any changes to Nova on its own.

Requirements

This extension requires:

  • Nova 2.6+

Installation

Copy the entire directory into applications/extensions/jquery.

Add the following to application/config/extensions.php:

$config['extensions']['enabled'][] = 'jquery';

Usage

An an example, is used by the chronological_mission_posts extension like this:

$this->event->listen(['location', 'view', 'output', 'admin', 'manage_posts_edit'], function($event){

  $event['output'] .= $this->extension['jquery']['generator']
                  ->select('[name="post_timeline"]')->closest('p')
                  ->after(
                    $this->extension['chronological_mission_posts']
                         ->view('write_missionpost', $this->skin, 'admin', $event['data'])
                  );

  $event['output'] .= $this->extension['jquery']['generator']
                           ->select('[name="post_timeline"]')->closest('p')->remove();
                  
});

This extension currently supports the following chained methods: first, last, before, after, append, prepend, html, text, closest, and remove. Submit a pull request for additional methods.

JonM

Compatibility

Nova 2.7
This add-on may work with Nova 2.7, but members of the community haven’t confirmed
Nova 2.6
This add-on may work with Nova 2.6, but members of the community haven’t confirmed

Version Info

1.0

Last updated

Links

No reviews