Skip to content

Instantly share code, notes, and snippets.

@ethanfu
Created December 7, 2012 08:55
Show Gist options
  • Save ethanfu/4231913 to your computer and use it in GitHub Desktop.
Save ethanfu/4231913 to your computer and use it in GitHub Desktop.
index.js
/**
* Created with IntelliJ IDEA.
* User: ethan
* Date: 12-12-7
* Time: 下午12:43
* To change this template use File | Settings | File Templates.
*/
(function(window){
var index = {
version : "0.1.0",
initIndexModules : function(){
getModules();
}
};
function getModules(){
jQuery.ajax({
url: 'moudles.xml',
dataType: 'xml',
complete: function(xhr, textStatus) {
//called when complete
},
success: function(data, textStatus, xhr) {
var pageCount = jQuery(data).find("module").length;
jQuery.each(data, function(index, val) {
jQuery(data).find("module").length;
});
},
error: function(xhr, textStatus, errorThrown) {
//called when there is an error
}
});
}
function renderModuleHtmlByData(data){
jQuery.
}
window.index = index;
})(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment