JAYbranding

클릭 시 탭 전환 및 해시태그 변경 감지

이 간단한 코드는 탭 버튼과 탭 콘텐츠를 만드는 데 도움을 줍니다. 사용자가 탭 버튼을 클릭하면 해당 탭 콘텐츠가 표시됩니다. 이 간단한 코드는 jQuery를 사용하며, 여러 탭에 많은 콘텐츠를 표시해야 할 때 유용합니다. <pre data-line=""> <code readonly="true"> <xmp> Button 1 Button 2 Button 3 tab content 1 tab content 2 tab content 3 <style> .btn{ border: 1px solid; padding: 10px; } .btn.selected{ background: red; } .tab{ background: #ccc; padding: 100px; opacity: 0.5; } .tab.selected{ opacity: 1; } </style></xmp> </code> </pre> Button 1 Button 2 Button 3 tab content 1 tab content 2 tab content 3 <style> .btn{ border: 1px solid; padding: 10px; } .btn.selected{ background: red; } .tab{ background: #ccc; padding: 100px; opacity: 0.5; } .tab.selected{ opacity: 1; } </style>