Skip to main content

Posts

Showing posts with the label accordion

HTTPS failed to load icons from JQuery API

I put CSS of jQuery UI 1.8.4 downto my site source code, with its images folder along. In the default page (wrapping page), jQuery CSS is initialized by declaration: <link href="//Css/App.SrsWPSite/jquery-ui-1.8.4.custom.css" rel="stylesheet" type="text/css" /> My jQuery accordion is set up as usual: $('SomeId').accordion({ header: '.menuItem', icons: { 'header': 'ui-icon-circle-plus', 'headerSelected': 'ui-icon-circle-minus' } }); It works normally in HTTP mode (CSS loaded successfully). But, in HTTPS mode, all jQuery accordion icons (and some other css formats) were unable to be loaded. Taking examination, I found out that they had image url the same to HTTP mode's: url("http://mypath//Css/Site/images/ui-icons_0078ae_256x240.png") If I let my site run binded under both HTTP (with default port 80) and HTTPS, then it's OK ! But for sure, I just want to force my site to ru

Custom Accordion

I have the accordion below which works but when an item is open if you click it again it re opens instead of closing. I'm not sure of the best way to adapt the code below to achieve this? Any help or advice would be great? Thanks $('.acc h2').click(function() { $('.acc h2.open').nextUntil('h2').stop(true, true).slideToggle(); $('.acc h2.open').removeClass('open'); $(this).nextUntil('h2').stop(true, true).slideToggle(900); $(this).toggleClass('open'); }); <div class="acc"> <h2>1. Title 1</h2> <div><p>text 1</p></div> <h2>2. Title 2</h2> <div><p>text 2</p></div> <h2>3. Title 3</h2> <div><p>text 3</p></div> </div><!--END acc-->