skip to Main Content

Remove attribute from an element using jQuery

I am trying to remove an attribute from an element using jQuery. HTML code- <div class="accordion"> <label>Test 1</label> <article style="max-height: inherit">Content 1</article> <label>Test 2</label> <article>Content 2</article> </div> jQuery code - $(".accordion label").on("click", function(e){ if($(this).next().attr('max-height')){ $(this.next()).removeAttr("max-height"); } }); It doesn't trigger…

VIEW QUESTION

Jquery – Javascript function openFullscreen() , how to get it worked for several iframes on the page

On page I have an iframe with *.pdf file in src. <div class="node--view-mode-full"> <p><iframe allow="fullscreen" allowfullscreen="" frameborder="0" height="980" scrolling="no" src="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" width="660"></iframe></p> <p><iframe allow="fullscreen" allowfullscreen="" frameborder="0" height="980" scrolling="no" src="https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf" width="660"></iframe></p> </div> The build-in pdf-viewers in browsers now does not support fullscreen…

VIEW QUESTION
Back To Top
Search