Its 'removeClass' Not 'RemoveClass' :
$( ".managed-only-trigger" ).removeClass( "cloud-text-managed-only" );
سؤال
I am trying to place onClick actions on two buttons (Managed and Unmanaged) which determines the style of multiple elements that have the 'managed-only-trigger' class.
The clicking of the Unmanaged button works fine, but when clicking Managed, the removeClass function doesn't seem to be working (it should remove the 'cloud-text-managed-only' override class and return the div to a normal style), it's throwing the following error:
Here is the jQuery and an example element (for reference):
// Managed / Unmanaged Functions
$( "#tab-managed" ).click(function() {
// re-enable the managed features
$( ".managed-only-trigger" ).RemoveClass( "cloud-text-managed-only" );
});
$( "#tab-unmanaged" ).click(function() {
// Ensure that we switch managed elements to disabled:
$( ".managed-only-trigger" ).addClass( "cloud-text-managed-only" );
});
<li class="cloud-tick managed-only-trigger">Some text that when unmanaged is clicked will turn grey based on the stylesheet</li>
Any help is appreciated.
المحلول
Its 'removeClass' Not 'RemoveClass' :
$( ".managed-only-trigger" ).removeClass( "cloud-text-managed-only" );