0 Replies - 2599 Views - Last Post: 07 August 2012 - 06:30 PM

#1 cj14  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 07-August 12

externalize this JavaScript

Posted 07 August 2012 - 06:30 PM

If anyone knows how to externalize this Javascript (J Query) function to display a new div overlay for a mobile app with "onload" instead of "onclick"....I'm all ears. Been working on it since Friday

- //<script>
$(function() {
$('#footer a').on('click', function(e){
$('.overlay').hide(50);
var target = '.overlay.' + $(this).attr('class');
...if($(target).css('display')=='none') {
$(target).show(50);
}
});
$(".ui-mobile-viewport").on("click",function(event){
var target = event.target;

if($('#show-overlay').find(target).length==0 && $('.overlay').find(target).length==0) {
$(".overlay").hide(50);
}
});
});
</script>

This post has been edited by Atli: 07 August 2012 - 06:31 PM
Reason for edit:: Please use [code] tags when posting code.


Is This A Good Question/Topic? 0
  • +

Page 1 of 1