Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <section class="expandable-onClick">
- <div class="element">
- <h2>tytul</h2>
- </div>
- <p class="excerpt">excerpt</p>
- </section>
- <iframe class="thebox"></iframe>
- $( ".expandable-onClick .element" ).click(function() {
- var urlTitle = $( this ).children('h2').text();
- var url ="partials/main/" + urlTitle + ".html";
- $( this ).parent().toggleClass("expanded");
- $( this ).parent().append($('<iframe class="thebox"></iframe>'));
- $('.thebox').attr( "src", encodeURIComponent( url ));
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement