1
如果我刪除了我的jQuery鏈接工具提示懸停CSS背景工作正常,但我的jQuery功能不工作(顯然是因爲jquery鏈接被刪除)請看我的代碼....謝謝 `引導工具提示不能與我的jQuery功能
<div class="col-sm-6">
<input type="text" id="id_part_pay" value="<?php echo $listing['part_pay'];?>" class="textbox" name="id_part_pay" <?php if($checked)echo 'style="display: block"'; else echo 'style="display: none"';?> />
<a href="" class="fa fa-question-circle" data-toggle="tooltip" data-placement="right" title="Hooray!"></a>
<span class="ft-s12"></span>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js">
$(function() {
$("#id_part_pay").next('span').hide();
$("#id_part_pay").keyup(function() {
var input = $(this).val();
var v = input % 10;
var span = $(this).next('span');
if (v !== 0) {
span.text("Enter Percentage in multiple of 10").show();
return;
}
if (input < 20 || input > 100) {
span.text("Percentage should be between 20 - 100").show();
return;
}
span.text('').hide();//Clear Text and hide
});
});
</script>