Jeffson Jeffson - 1 year ago 112
Javascript Question

Convert Jquery plugin Into Javascript

Is there anybody here who knows the Javascript-equivalent or the Javascript version of the code below?

(function($) {
$ = function() {
var selector = this;
selector.css('color' , 'green');

And so on I will call this :


Answer Source

You can do it with prototype method, you wan override or set basics JS methods to Elements,Objects,type etc...


Element.prototype.Color = function(color)

Element.prototype.Green = function()

<div id="myid">Div element</div>
<div id="secondid">Second div</div>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download