Skip to content

Commit bb25ea4

Browse files
committed
Update JsUtilsActionsTrait.php
1 parent e10dfd3 commit bb25ea4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Ajax/common/traits/JsUtilsActionsTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -792,13 +792,13 @@ public function counterOn($element, $event, $counterSelector, $value = 0, $limit
792792
* @return string
793793
*/
794794
public function activateLink($target, $property = 'href', $href = null) {
795-
$js = '$(' . $target . ' [' . $property . ']).removeClass("active");';
795+
$js = '$("' . $target . ' [' . $property . ']").removeClass("active");';
796796
if (isset($href)) {
797797
$js .= 'var href="' . $href . '";';
798798
} else {
799799
$js .= 'var href=window.location.href;';
800800
}
801-
$js .= '$(' . $target . ' [' . $property . ']).each(function(){if(href.includes($(this).attr("' . $property . '"))) $(this).addClass("active");});';
802-
return $js;
801+
$js .= '$("' . $target . ' [' . $property . ']").each(function(){if(href.includes($(this).attr("' . $property . '"))) $(this).addClass("active");});';
802+
return $this->execAtLast($js);
803803
}
804804
}

0 commit comments

Comments
 (0)