orbit-basic/app/assets/javascripts/kernel.js

44 lines
958 B
JavaScript
Raw Normal View History

var banners = [];
var banner_index = 0;
$(document).ready(function() {
$.each($(".dymanic_load"),function(){
if($(this).attr("path")==''){
$(this).html("");
}else{
ajax_load_proc($(this),$(this).attr("path"));
}
2011-12-23 10:34:21 +00:00
});
$("#main_content").addClass("module");
});
function ajax_load_proc(wapper,url,isBanner){
2012-12-24 07:22:26 +00:00
$.get(encodeURI(url), {}, function(respText,textSta,XML){
if (textSta == 'success') {
2013-11-13 02:19:40 +00:00
if (respText.indexOf("<title>") == -1) wapper.html(respText);
};
if(textSta == 'error')
wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");
2011-12-23 10:34:21 +00:00
});
}
2012-02-27 09:48:30 +00:00
$(document).ready(function() {
$(document).on('click', '.orbit-cycle-slideshow img', function()
{
2012-08-13 03:03:11 +00:00
if($(this).attr('link_url')!='')
{
2012-08-13 03:03:11 +00:00
if($(this).attr('link_open')=='new_window')
{
window.open($(this).attr('link_url'));
}
2012-08-13 03:03:11 +00:00
else
{
document.location.href=$(this).attr('link_url')
}
2012-08-13 03:03:11 +00:00
}
})
});
2012-02-19 09:43:47 +00:00
// Ad Banner FX code [end]