Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
同じページのツールチップを参照するにはどうすればよいですか? 現在、外部ファイルを参照する次のものがありますが、同じページを参照するために何を変更する必要がありますか?
$('#tip-container').empty().load('tooltips.html ' + tooltipId).fadeIn(500); ?
ありがとう
ツールチップのコンテンツが既にページにあるため、サーバーを呼び出してツールチップのコンテンツを取得する必要がない場合は、load() は必要ありません。jqueryセレクターを使用するだけです。ページ上のツールチップ コンテンツの正確な位置に応じて、次のようになります。
var tooltipContent=$('#'+tooltipId).html(); $('#tip-container').html(tooltipContent).fadeIn(500);