링크가 맴돌 때 메시지를 표시하는 코드가 있습니다. 이것은 tooltipster를 사용하고 페이지로드시 처음에는 정상적으로 작동합니다. 내 문제는 라디오 버튼을 클릭하면 차례로 클래스 tooltipbfile
의 텍스트가 원하는대로 변경되지만 텍스트를 다시 클릭하여 클릭하면 해당 호버 기능이 손실 된 것으로 보입니다. 툴팁이 표시되지 않습니다. 마우스 센터 이벤트를 어딘가에 활성화해야합니까? 나는 $(".tooltipbfile").prop('enabled', true);
과 같은 코드를 보았지만 아무런 차이가 없다.jQuery mouseover 이벤트 사용
클릭 이벤트 후 마우스 이벤트를 다시 활성화하는 올바른 방법을 누군가에게 보여 주시면 감사하겠습니다. 감사합니다
업데이트 : 툴팁 API 당. $ (". tooltipbfile"). tooltipster ('disable');
jQuery 코드
$(function() {
$('input:radio').click(function(){
if($(this).val()=='New Intake'){
$("#fileref").hide();
$(".maxbox").show();
$("#INTKAddMoreFileBox").show();
$(".tooltipbfile").text("Help");
}else if($(this).val()=='New Intake Files'){
$("#fileref").show();
$(".maxbox").hide();
$(".tooltipbfile").text("Some text here.").show();
$("#INTKAddMoreFileBox").hide();
$(".tooltipbfile").tooltipster('disable');
}
});
});
Tooltipster 코드
는 페이지로드
<script type="text/javascript">
$(document).ready(function() {
$('.tooltipbfile').tooltipster({
theme: 'tooltipster-light',
position: 'right',
animation: 'fade',
fixedWidth: 200,
maxWidth: 290,
content: $('<span>blah blah blah</span>')
});
});
</script>
HTML
관련 부분
<div class="fieldset">
<h1><span>Enter Box(es) Reference</span></h1>
<p>
<a href="#" id="INTKAddMoreFileBox" class="btn btn-info">Add More Boxes</a>
<span class="maxbox" style="margin-left:10px;font-size:10px;color: grey;">(Maximum 8)</span>
<!--<div class="bxhelp">
You now have the ability to input more than 1 box just by clicking the Add More boxes link. Please only enter 1 box reference per box. You can enter up to a maximum of 8 boxes.
<a href="javascript:void(0)" class="boxhelpcls">Close</a>
</div>-->
<div id="INTKInputsWrapper">
<p>
<input name="box_add[]" type="text" required="required />
<a href="javascript:void(0)" class="removeclass"></a>
<a style="margin-left: 14px;" href="javascript:void(0)" class="tooltipbfile">Help</a>
</p>
</div>
</p>
</div>
<div class="fieldset" id="fileref">
<h1><span>Enter File References</span></h1>
<p>
<a href="javascript:void(0)" id="BFINTKAddMoreFile" class="btn btn-info">Add More Files</a>
<span class="fmaxbox" style="margin-left:10px;font-size:10px;color: grey;">(Maximum 8)</span>
<!--<div class="fbxhelp">
You now have the ability to input more than 1 file just by clicking the Add More files link. You can enter up to a maximum of 8 files.
<a href="javascript:void(0)" class="fboxhelpcls">Close</a>
</div>-->
<div id="BFINTKInputsWrapper">
<p>
<input name="bfile_add[]" id="bfile_add[]" type="text" required="required" />
<a href="javascript:void(0)" class="removeclass"></a>
<a style="margin-left: 14px;" href="javascript:void(0)" class="fboxhelp">Help</a>
</p>
</div>
</p>
</div>
01에서 제대로 작동 23,516,
문제에 대한 샘플 바이올린 데모를 작성하십시오 – Rex
html을 게시 할 수 있습니까? – francadaval
@Rex는 바이올린을 만들려고했으나 tooltipster 라이브러리에 대한 외부 링크는 없습니다. 감사합니다 – user1532468