Skip to content

Commit

Permalink
Fix anchor on off-canvas sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
joomlart committed Apr 8, 2016
1 parent a715ca6 commit 69bf2b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/plg_system_t3/base-bs3/js/off-canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ jQuery (document).ready(function($){

var handleClick = function (e) {
if (e.target.tagName == 'A') {
oc_hide();
// handle the anchor link
var arr1 = e.target.href.split('#'),
arr2 = location.href.split('#');
if (arr1[0] == arr2[0] && arr1.length > 1) {
if (arr1[0] == arr2[0] && arr1.length > 1 && arr1[1].length) {
oc_hide();
setTimeout(function(){
var anchor = $("a[name='"+ arr1[1] +"']");
if (!anchor.length) anchor = $('#' + arr1[1]);
Expand Down

0 comments on commit 69bf2b2

Please sign in to comment.