Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Are there any plugins for highlighting in jquery?


Asked by Donovan Wise on Dec 06, 2021 jQuery



Another highlight plugin based on pure jQuery that can be used to highlight any element of your website. It offers an interactive functionality of highlighting the text and elements. The plugin lets you highlight the section that you’ve clicked and turned the background dark with just a click.
Besides,
A very simple and tiny text highlighting plugin that laid the basis for many forks. Because it doesn’t allow any customization, its strength is the small file size (1.4 KB). A fork of highlight (#2 above) that adds the base options to specify a custom element and class name as well as an option caseSensitive and wordsOnly.
In respect to this, As we already shown above in How does it work section, you can highlight text in any elements simply by running highlight function on them. So to highlight word 'highlight' in every paragraph of this page run: $("body p").highlight("highlight");
Also,
Plugins A jQuery plugin is simply a new method that we use to extend jQuery's prototype object. By extending the prototype object you enable all jQuery objects to inherit any methods that you add. As established, whenever you call jQuery () you're creating a new jQuery object, with all of jQuery's methods inherited.
In fact,
EnlighterJS is a free, easy-to-use, syntax highlighting plugin developed for MooTools. Using it can be as simple as adding a single script and style to your website, choosing the elements you wish to highlight, and EnlighterJS takes care of the rest. Just add the data-enlighter-language attribute to specify the programming language :