Skip to content

Commit 4ef6643

Browse files
committed
fixed hash issues #413 & #432
1 parent 7becb1e commit 4ef6643

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

js/jquery.anythingslider.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363

6464
// Figure out how many sliders are on the page for indexing
6565
base.runTimes = $('.anythingBase').length;
66-
base.regex = new RegExp('panel' + base.runTimes + '-(\\d+)', 'i'); // hash tag regex
66+
// hash tag regex - fixes issue #432
67+
base.regex = (o.hashTags) ? new RegExp('panel' + base.runTimes + '-(\\d+)', 'i') : null;
6768
if (base.runTimes === 1) { base.makeActive(); } // make the first slider on the page active
6869

6970
// Set up a few defaults & get details
@@ -712,7 +713,7 @@
712713
i = h.indexOf('&'),
713714
n = h.match(base.regex);
714715
// test for "/#/" or "/#!/" used by the jquery address plugin - $('#/') breaks jQuery
715-
if (n === null && !/^#&/.test(h) && !/#!?\//.test(h)) {
716+
if (n === null && !/^#&/.test(h) && !/#!?\//.test(h) && !/=/.test(h)) {
716717
// #quote2&panel1-3&panel3-3
717718
h = h.substring(0, (i >= 0 ? i : h.length));
718719
// ensure the element is in the same slider

0 commit comments

Comments
 (0)