MCPcopy Index your code
hub / github.com/TruthHun/BookStack / tabToggle

Function tabToggle

static/wangEditor/js/wangEditor.js:5282–5307  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5280
5281 // tab 切换事件
5282 function tabToggle() {
5283 $uploadTab.click(function (e) {
5284 $tabContainer.children().removeClass('selected');
5285 $contentContainer.children().removeClass('selected');
5286 $uploadContent.addClass('selected');
5287 $uploadTab.addClass('selected');
5288 e.preventDefault();
5289 });
5290 $linkTab.click(function (e) {
5291 $tabContainer.children().removeClass('selected');
5292 $contentContainer.children().removeClass('selected');
5293 $linkContent.addClass('selected');
5294 $linkTab.addClass('selected');
5295 e.preventDefault();
5296
5297 // focus input
5298 if (E.placeholder) {
5299 $linkContent.find('input[type=text]').focus();
5300 }
5301 });
5302
5303 // 默认情况
5304 // $uploadTab.addClass('selected');
5305 // $uploadContent.addClass('selected');
5306 $uploadTab.click();
5307 }
5308
5309 // 隐藏上传图片
5310 function hideUploadImg() {

Callers 1

wangEditor.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected