Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var hash = window.location.hash.substring(1);
- $("#"+hash+"").show().siblings(".test-text").hide();
- $(document).ready(function(){
- $('.nav-test').on('click', function(){
- var target = $(this).attr('href');
- $(target).show().siblings(".test-text").hide();
- });
- });
- Máš <a href="#main">Main </a>
- Což je přepínač k div
- <div class="id=main>
- //Tvůj kontent následně script
- </div>
- Zkráceně
- v href= musí být #main_content
- v DIV id = "main_content"
- Pak to bude
- href="#content2"
- <div id="content2"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement