Skip to main content Skip to docs navigation

Update the class attribute of and element selected using element finder

On this page
e.g. Class::add::btn
Now add new class to element using class syntax.
  • <input class="button"> -> <input class="button btn">
e.g. Class::remove::btn
Now remove new class from element using class syntax.
  • <input class="button btn"> -> <input class="button">
e.g. Class::replace::unlike::like
Now replace one class with another to element using class syntax.
  • <span class="unlike"> -> <span class="like">
Class::clearNow remove all class of element using class syntax.
  • <input class="btn btn-primary button"> -> <input class="">