File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change 960
960
return ;
961
961
}
962
962
963
- var $link = $ ( link ) ;
963
+ var $link = $ ( link ) ,
964
+ //remove active link class if external (then it won't be there if you come back)
965
+ httpCleanup = function ( ) {
966
+ window . setTimeout ( function ( ) { removeActiveLinkClass ( true ) ; } , 200 ) ;
967
+ } ;
964
968
965
969
//if there's a data-rel=back attr, go back in history
966
970
if ( $link . is ( ":jqmData(rel='back')" ) ) {
967
971
window . history . back ( ) ;
968
972
return false ;
969
973
}
970
-
974
+
975
+ //if ajax is disabled, exit early
976
+ if ( ! $ . mobile . ajaxEnabled ) {
977
+ httpCleanup ( ) ;
978
+ //use default click handling
979
+ return ;
980
+ }
981
+
971
982
var baseUrl = getClosestBaseUrl ( $link ) ,
972
983
973
984
//get href, if defined, otherwise default to empty hash
1016
1027
1017
1028
$activeClickedLink = $link . closest ( ".ui-btn" ) ;
1018
1029
1019
- if ( isExternal || ! $ . mobile . ajaxEnabled ) {
1020
- //remove active link class if external (then it won't be there if you come back)
1021
- window . setTimeout ( function ( ) { removeActiveLinkClass ( true ) ; } , 200 ) ;
1022
-
1030
+ if ( isExternal ) {
1031
+ httpCleanup ( ) ;
1023
1032
//use default click handling
1024
1033
return ;
1025
1034
}
You can’t perform that action at this time.
0 commit comments