Fix accordion header links - ignore parenthesis

This commit is contained in:
Mottie 2014-02-19 12:12:12 -06:00
parent 5cafeb49a7
commit b0efc37d28
2 changed files with 6 additions and 6 deletions

View File

@ -167,7 +167,7 @@
</ul>
</div>
<h3><a href="#"><strong>Default Select</strong> (&quot;First Name&quot; column)</a></h3>
<h3><a href="#"><strong>Default Select</strong></a> <span class="xsmall">(&quot;First Name&quot; column)</span></h3>
<div>
<ul>
<li>To enable this type of select, set the <code>filter_functions</code> option for the column to <code>true</code>,<pre class="prettyprint lang-javascript">filter_functions : {
@ -185,7 +185,7 @@
</ul>
</div>
<h3><a href="#"><strong>Custom Filter Function</strong> (&quot;Last Name&quot; column)</a></h3>
<h3><a href="#"><strong>Custom Filter Function</strong></a> <span class="xsmall">(&quot;Last Name&quot; column)</span></h3>
<div>
<ul>
<li>To enable this type of filter, add your custom function to the <code>filter_functions</code> option following this example:<pre class="prettyprint lang-javascript">filter_functions : {
@ -202,7 +202,7 @@
</ul>
</div>
<h3><a href="#"><strong>Custom Select</strong> (&quot;City&quot; or &quot;Total&quot; column)</a></h3>
<h3><a href="#"><strong>Custom Select</strong></a> <span class="xsmall">(&quot;City&quot; or &quot;Total&quot; column)</span></h3>
<div>
<ul>
<li>To enable this type of select, add your custom options within the <code>filter_functions</code> option.</li>
@ -235,7 +235,7 @@
</ul>
</div>
<h3><a href="#"><strong>Default Select showing only available options (&quot;Discount&quot; column)</strong></a></h3>
<h3><a href="#"><strong>Default Select with only available options</strong></a> <span class="xsmall">(&quot;Discount&quot; column)</span></h3>
<div>
<ul>
<li>This column uses the same method as the &quot;First Name&quot; column with one exception, it also includes the &quot;filter-onlyAvail&quot; class name in the header

View File

@ -95,7 +95,7 @@ $(function(){
var hashId = 0;
if (window.location.hash) {
$t.children('h3').each(function(i){
var txt = $(this).find('a').text().toLowerCase().replace(/\s+/g,'_').replace(/[()\"]/g,'');
var txt = $(this).find('a').text().toLowerCase().replace(/[()\"]/g,'').replace(/[\s+\/]/g,'_');
this.id = txt;
if (txt === window.location.hash.slice(1)) {
hashId = i;
@ -109,7 +109,7 @@ $(function(){
collapsible: true,
create: function( event, ui ) {
$t.children('h3').each(function(i){
this.id = $(this).find('a').text().toLowerCase().replace(/\s+/g,'_').replace(/[()\"]/g,'');
this.id = $(this).find('a').text().toLowerCase().replace(/[-()\"]/g,'').replace(/[\s+\/]/g,'_');
$(this).before('<a class="accordion-link link" data-index="' + i + '" href="#' + this.id + '"></a>');
});
$t.find('.accordion-link').click(function(){