Created
December 7, 2012 08:55
-
-
Save ethanfu/4231913 to your computer and use it in GitHub Desktop.
index.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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