2017. 11. 28.

제이쿼리 Tabs 사용시 jQueryUI CSS 제거하기


제이쿼리 탭 사용할 경우 jQueryUI를 제거해야할 경우가 발생한다.

아래와 같이 스크립트 적용하면, 해당 CSS를 제거 할 수 있다.

var jQueryUiClass = [".ui-tabs", ".ui-tabs-nav", ".ui-tabs-panel", ".ui-widget", ".ui-widget-header", ".ui-widget-content", ".ui-corner-all", ".ui-corner-top", ".ui-corner-bottom", ".ui-helper-clearfix", ".ui-helper-reset", ".ui-state-default"];

$("#tabs").tabs().each(function(){
   $tabEle = $(this).find( jQueryUiClass.join(", ") ).andSelf();
   $tabEle.removeClass( jQueryUiClass.join(" ").replace(/\./g, "") );
});

댓글 없음:

댓글 쓰기