Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#6866 closed feature (wontfix)

Feature request for removeCSS

Reported by: lathan Owned by:
Priority: undecided Milestone: 1.4.3
Component: css Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

Description

function to remove Css instead of having to do .css({'background': });

This function was written by user147767 (http://stackoverflow.com/users/147767/user147767) on StackOverFlow

jQuery.fn.extend
({
    removeCss: function(cssName) {
        return this.each(function() {
            var curDom = $(this);
            jQuery.grep(cssName.split(","),
                    function(cssToBeRemoved) {
                        curDom.css(cssToBeRemoved, '');
                    });
            return curDom;
        });
    }
});

Change History (1)

comment:1 Changed 9 years ago by snover

Priority: undecided
Resolution: wontfix
Status: newclosed

I don’t see any use case for this that is not already addressed in jQuery.

Note: See TracTickets for help on using tickets.