Sort images
Sort images
Hey Guys,
I'm new here and first a question.
I want to include the plug-in to sort images.
So I do this?! (right?)
[code]
$(document).ready(function(){
$('#the_table').dataTable({
"aoColumns":
[
null,
null,
null,
{ "sType": "title-string" },
{ "sType": "title-string" },
null
]
});
});
[/code]
But where comes the alt string code?
[code]
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"alt-string-pre": function ( a ) {
return a.match(/alt="(.*?)"/)[1].toLowerCase();
},
"alt-string-asc": function( a, b ) {
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
},
"alt-string-desc": function(a,b) {
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
}
} );
[/code]
Can someone help me with a detailed description?
Thank you guys!
I'm new here and first a question.
I want to include the plug-in to sort images.
So I do this?! (right?)
[code]
$(document).ready(function(){
$('#the_table').dataTable({
"aoColumns":
[
null,
null,
null,
{ "sType": "title-string" },
{ "sType": "title-string" },
null
]
});
});
[/code]
But where comes the alt string code?
[code]
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"alt-string-pre": function ( a ) {
return a.match(/alt="(.*?)"/)[1].toLowerCase();
},
"alt-string-asc": function( a, b ) {
return ((a < b) ? -1 : ((a > b) ? 1 : 0));
},
"alt-string-desc": function(a,b) {
return ((a < b) ? 1 : ((a > b) ? -1 : 0));
}
} );
[/code]
Can someone help me with a detailed description?
Thank you guys!
This discussion has been closed.
Replies
Firebug tells
[code]oSort[ (sDataType ? sDataType : 'string')+"-"+aaSort[k][1] ] [/code]
this is not a function
[code]
$(document).ready(function(){
$('#the_table').dataTable({
"aoColumns":
[
null,
null,
null,
{ "sType": "title-string" },
{ "sType": "title-string" },
null
]
});
});
[/code]
thats wrong.
with alt-string works all fine!
Can be closed here.