How to create jquery Plugin?

Idea behind this plugin is to catch any event on <a> link and open the URL on new screen. /*! jQuery anchormaaster Plugin – v1.0 – 18/2/2014 * Copyright CM (c) 2014 codebased@hotmail.com; Licensed MIT */ (function ($) { // function that go through each link available in the given …

How to Extend string object in JavaScript?

$(function () { // — DOM is ready to action on. /* Summary: startsWith should take a single argument and return true if the provided string is a prefix of this. */ if (typeof String.prototype.startsWith !== ‘function’) { // checked and there is no startsWith (pre-defined) method. String.prototype.startsWith = function …