Skip to content

Commit e880886

Browse files
committed
Namespaced data attributes in fetchlink plugin.
1 parent edc85c7 commit e880886

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

js/jquery.mobile.fetchlinks.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,25 @@ $.widget( "mobile.fetchlink", $.mobile.widget, {
66
},
77
_create: function() {
88
var self = $( this.element ),
9-
target = self.attr( "href" ) ? self : self.find( "a" ).not( ":jqmData(role='fetchlink')" );
9+
target = self.attr( "href" ) ? self : self.find( "a" ).not( ":jqmData(target)" );
1010

1111
target
1212
.click(function() {
1313
var el = $( this ),
1414
url = el.attr( "href" ),
15-
target = self.data( "target" ),
15+
target = self.jqmData( "target" ),
1616
targetEl = target && $( target ) || self,
17-
fragment = self.data( "fragment" ),
17+
fragment = self.jqmData( "fragment" ),
1818
load = fragment || ":jqmData(role='page')",
19-
threshold = screen.width > parseInt( el.data( "breakpoint" ) || 0 ),
19+
threshold = screen.width > parseInt( el.jqmData( "breakpoint" ) || 0 ),
2020
methods = [ "append", "prepend", "replace", "before", "after" ],
2121
method = "html",
2222
url;
2323

2424
if ( threshold ) {
2525

2626
for( var ml = methods.length, i = 0; i < ml; i++ ){
27-
if( el.is( "[data-method='" + methods[ i ] + "']" ) ){
27+
if( el.is( ":jqmData(method='" + methods[ i ] + "')" ) ){
2828
method = methods[ i ];
2929
}
3030
}

0 commit comments

Comments
 (0)