JavaScript — как сделать OnClick работу на другую страницу, а не только ту же страницу

OnClick, как сделать работу на другую страницу, а не только ту же страницу

1 получил его на работу, так что мой аккордеон открывается с гиперссылкой, когда он находится на той же странице, но один я не увенчались успехом еще для открытия гармошку, когда он связан с другой страницы. Поэтому вместо того, чтобы {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt; 1 Требуется: {amp}lt;a href="somewebsite.com#test" onclick='$("somewebsite.com#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;

Но это не будет открываться, когда 1 ссылка это на другую страницу? Может кто-то пожалуйста просветить меня?

  $('.toggle').click(function(e) { e.preventDefault(); var $this = $(this); if ($this.next().hasClass('show')) { $this.next().removeClass('show'); $this.next().slideUp(350); } else { $this.parent().parent().find('li .inner').removeClass('show'); $this.parent().parent().find('li .inner').slideUp(350); $this.next().toggleClass('show'); $this.next().slideToggle(350); } }); 
  .toggle{ margin-left:0px; } ul.accordion { list-style: none; padding: 0; margin:0; } ul.accordion .inner { padding-left: 50px; padding-top: 10px; overflow: hidden; display: none; } ul.accordion li { margin: .5em 0; font-weight: 300; } ul.accordion li a.toggle { display: block; background: rgba(0,114,178, 1); color: #fefefe; padding: .75em; padding-left: 50px; border-radius: 0.4em; transition: background .3s ease; text-decoration: none; } ul li a.toggle:hover { background: rgba(0,114,178, 0.75); } .centerjustifiy { width:60%; } 
 {amp}lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;div class="centerjustify"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.{amp}lt;/p{amp}gt; {amp}lt;ul class="accordion"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a class="toggle" href="javascript:void(0);"{amp}gt;Item 3{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner #2{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Children will automatically close upon closing its parent. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a id="test" class="toggle" href="javascript:void(0);"{amp}gt;Item 4{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Technically any number of nested elements{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Another nested element{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; As long as the inner element has inner as one of its classes then it will be toggled. {amp}lt;/p{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 2{amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; , {amp}lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;div class="centerjustify"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.{amp}lt;/p{amp}gt; {amp}lt;ul class="accordion"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a class="toggle" href="javascript:void(0);"{amp}gt;Item 3{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner #2{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Children will automatically close upon closing its parent. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a id="test" class="toggle" href="javascript:void(0);"{amp}gt;Item 4{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Technically any number of nested elements{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Another nested element{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; As long as the inner element has inner as one of its classes then it will be toggled. {amp}lt;/p{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 2{amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; - {amp}lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;div class="centerjustify"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.{amp}lt;/p{amp}gt; {amp}lt;ul class="accordion"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a class="toggle" href="javascript:void(0);"{amp}gt;Item 3{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner #2{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Children will automatically close upon closing its parent. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a id="test" class="toggle" href="javascript:void(0);"{amp}gt;Item 4{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Technically any number of nested elements{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Another nested element{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; As long as the inner element has inner as one of its classes then it will be toggled. {amp}lt;/p{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 2{amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; во {amp}lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;div class="centerjustify"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.{amp}lt;/p{amp}gt; {amp}lt;ul class="accordion"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a class="toggle" href="javascript:void(0);"{amp}gt;Item 3{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner #2{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Children will automatically close upon closing its parent. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a id="test" class="toggle" href="javascript:void(0);"{amp}gt;Item 4{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Technically any number of nested elements{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Another nested element{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; As long as the inner element has inner as one of its classes then it will be toggled. {amp}lt;/p{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 2{amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; До {amp}lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;div class="centerjustify"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.{amp}lt;/p{amp}gt; {amp}lt;ul class="accordion"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a class="toggle" href="javascript:void(0);"{amp}gt;Item 3{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner #2{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Children will automatically close upon closing its parent. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a id="test" class="toggle" href="javascript:void(0);"{amp}gt;Item 4{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Technically any number of nested elements{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Another nested element{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; As long as the inner element has inner as one of its classes then it will be toggled. {amp}lt;/p{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 2{amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; , {amp}lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;div class="centerjustify"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.{amp}lt;/p{amp}gt; {amp}lt;ul class="accordion"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a class="toggle" href="javascript:void(0);"{amp}gt;Item 3{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner #2{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Children will automatically close upon closing its parent. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a id="test" class="toggle" href="javascript:void(0);"{amp}gt;Item 4{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Technically any number of nested elements{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Another nested element{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; As long as the inner element has inner as one of its classes then it will be toggled. {amp}lt;/p{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 2{amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; в {amp}lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;div class="centerjustify"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.{amp}lt;/p{amp}gt; {amp}lt;ul class="accordion"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a class="toggle" href="javascript:void(0);"{amp}gt;Item 3{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner #2{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Children will automatically close upon closing its parent. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a id="test" class="toggle" href="javascript:void(0);"{amp}gt;Item 4{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Technically any number of nested elements{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Another nested element{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; As long as the inner element has inner as one of its classes then it will be toggled. {amp}lt;/p{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 2{amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; , {amp}lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;div class="centerjustify"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.{amp}lt;/p{amp}gt; {amp}lt;ul class="accordion"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a class="toggle" href="javascript:void(0);"{amp}gt;Item 3{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner #2{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Children will automatically close upon closing its parent. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a id="test" class="toggle" href="javascript:void(0);"{amp}gt;Item 4{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Technically any number of nested elements{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Another nested element{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; As long as the inner element has inner as one of its classes then it will be toggled. {amp}lt;/p{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 2{amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; во {amp}lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"{amp}gt;{amp}lt;/script{amp}gt; {amp}lt;div class="centerjustify"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, {amp}lt;a href="#test" onclick='$("#test").click()'{amp}gt;TEST{amp}lt;/a{amp}gt;pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui.{amp}lt;/p{amp}gt; {amp}lt;ul class="accordion"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a class="toggle" href="javascript:void(0);"{amp}gt;Item 3{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Open Inner #2{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; Children will automatically close upon closing its parent. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a id="test" class="toggle" href="javascript:void(0);"{amp}gt;Item 4{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Technically any number of nested elements{amp}lt;/a{amp}gt; {amp}lt;ul class="inner"{amp}gt; {amp}lt;li{amp}gt; {amp}lt;a href="#" class="toggle"{amp}gt;Another nested element{amp}lt;/a{amp}gt; {amp}lt;div class="inner"{amp}gt; {amp}lt;p{amp}gt; As long as the inner element has inner as one of its classes then it will be toggled. {amp}lt;/p{amp}gt; {amp}lt;p{amp}gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tempus placerat fringilla. Duis a elit et dolor laoreet volutpat. Aliquam ultrices mauris id mattis imperdiet. Aenean cursus ultrices justo et varius. Suspendisse aliquam orci id dui dapibus blandit. In hac habitasse platea dictumst. Sed risus velit, pellentesque eu enim ac, ultricies pretium felis. {amp}lt;/p{amp}gt; {amp}lt;/div{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 2{amp}lt;/li{amp}gt; {amp}lt;li{amp}gt;Option 3{amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/li{amp}gt; {amp}lt;/ul{amp}gt; {amp}lt;/div{amp}gt; 
Понравилась статья? Поделиться с друзьями:
JavaScript & TypeScript
Adblock
detector