Ramesh
Ramesh

Reputation: 422

Increase jQuery Mobile slider handle's clickable area

I would like to increase jQuery mobile slider's handle clickable area. As of now, the handle's clickable area is small. so, I am unable to tap and change the range of the handle everytime. I want to have the handle size to be the same but increase the clickable area. My custom CSS is as follows.

.ui-slider-track .ui-btn.ui-slider-handle {
  width: 12px;
  height: 12px;
  margin: -10px 0 0 -10px;
  background-color:#0096E2;
  padding: 5px;
  border-color: #0096E2;
}

Upvotes: 0

Views: 80

Answers (1)

Mohammed Ibrahim
Mohammed Ibrahim

Reputation: 418

div {
  position: relative;
  width: 100px;
  height: 100px;
  border: 1px dashed #eee;
  cursor: pointer;
  transition: background-color 1.5s;
}

div::before {
  content: '';
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  background-color: rgb(188,20,20);
  border-radius: 2px;
}

div:hover {
  background-color: #FFFFDF;
}
<div></div>

Upvotes: 1

Related Questions