hersh
hersh

Reputation: 1183

scrollbar for div

Can someone provide me with information on how to add both vertical and horizontal scrollbar using jquery? For example a textbox with an Id="txtBox".

Upvotes: 0

Views: 294

Answers (1)

Using CSS

#txtBox {
  overflow: scroll;
}

Adding the CSS property with JQuery:

$("#txtBox").css("overflow", "scroll");

You could also use overflow-x and overflow-y separately.

Upvotes: 2

Related Questions