简体   繁体   中英

How to show/hide div using input range value

I want to show/hide div using input range value in loop so i need to use this if someone know im waiting for help

$(function() {
    $(".range").on('click', function() {
        $(this).parent().next(".content").toggle();
    });
})

https://jsfiddle.net/w1zp3r/1gyxm65o/7/

Well i figured it out

if someone else need can use this

$(function() {
$(".range").on('click', function() {
if ($("input").val() == 5 ) {

      $(this).parent().next(".content").toggle();
  }
  else {
    $(this).parent().next(".content").hide();
  }
});

})

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM