Tôi có thanh cuộn javascript thay thế thanh cuộn webkit/mozilla bình thường. nó hoạt động trên tất cả các div khác của tôi chỉ bằng cách gõ vào tên div ".element" tuy nhiên im không chắc chắn làm thế nào để làm có được thanh cuộn để áp dụng cho một khu vực văn bản? không ai biết làm thế nào tôi sẽ làm điều này, sẽ đánh giá cao bất kỳ những người giúp đỡ nhờ.Làm cách nào để đính kèm thanh cuộn javascript vào vùng văn bản?
JAVASCRIPT:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script src="assets/js/scroll/jquery.mousewheel.min.js"></script>
<script src="assets/js/scroll/jquery.mCustomScrollbar.js"></script>
<script>
(function($){
$(window).load(function(){
$(".bio textarea").mCustomScrollbar();
});
})(jQuery);
</script>
HTML:
<form action="includes/changebio.php" method="post" id="form1">
<textarea id="bio" style="width: 442px;
margin-top:3px;
text-align:left;
margin-left:-2px;
height: 120px;
resize: none;
outline:none;
border: hidden;" textarea name="bio" data-id="bio" maxlength="710"><?php echo stripslashes($profile['bio']); ?></textarea>
<input type="image" src="assets/img/icons/save-edit.png"class="bio-submit" name="submit" value="submit" id="submit"/>
</form>