Hi,
I want to add and remove a class from an element from jquery.
Here is my code:
@Html.TextAreaFor(m => m.TextAreaName, new { @id = "textAreaId", @maxlength = 1000 })Please give me some idea to achieve this task.
home / developersection / forums / how to add and remove class from an element from jquery?
Hi,
I want to add and remove a class from an element from jquery.
Here is my code:
@Html.TextAreaFor(m => m.TextAreaName, new { @id = "textAreaId", @maxlength = 1000 })Please give me some idea to achieve this task.
Anonymous User
02-Apr-2018Hi Franco,
You can achieve your task by following these line of code:
For add class:
$("#textAreaId").addClass('TestClass');For remove class:
$("#textAreaId").removeClass('TestClass');I hope it's informative!!!