Skip to the content.

$.fn.removeProp(name)

Delete a JavaScript property from every element in the collection.

This affects only the DOM node’s property — it does not remove the matching HTML attribute. For removing markup attributes use attr(name, null).

Signatures

removeProp(prop: string): this;

Parameters

Returns

The original Dabby collection for chaining.

Examples

import $ from "dabbyjs";
import "dabbyjs/attributes/removeprop/removeprop";

// Strip a custom property set earlier
$("#widget").removeProp("dabbyState");
import $ from "dabbyjs";
import "dabbyjs/attributes/removeprop/removeprop";

// Remove an inline-bound handler reference
$("button").removeProp("onclick");

See also