need some jquery if-else statement help
- by zeemy23
Hello, the code below is broken, but I'm not sure how. I've definitely made some big assumptions here as a newbie.
I'm basically trying to create an if else where imBannerRotater functions on #cast if the variable is true and #pram if it is false.
How could I fix this to get that result?
The # are URLs.
Thanks!-zeem
$(document).ready(function(){
if (mmjsRegionName == 'CO')
{
$("#cast").imBannerRotater({
return_type: 'json',
data_map: {
image_name: 'name',
url_name: 'url'
},
image_url: '#',
base_path: '#',
});
}
else
{
$("#pram").imBannerRotater({
return_type: 'json',
data_map: {
image_name: 'name',
url_name: 'url'
},
image_url: '#',
base_path: '#',
});
});