1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Jquery not working in iframe based app

Discussion in 'Facebook API' started by akshat.gl, Jul 22, 2011.

  1. #1
    hi,

    I have made a facebook app

    http://apps.facebook.com/typetest

    The app works fine in firefox and IE too
    but it's jquery function (only a specific portion) doesn't seem to work in chrome.

    here is the code :
    SEMrush
    if(orbhit > 25){
    	
    	
    	$(gameover).html("<img src='images/continue.png' /><h2 style='padding-top: 10px;'>Level up</h2><p>Level Score:</p>" + 
    		"<table align='center'><tr><td width='250' align='center'><p class='counter'>"+orbhit+"</p><p>hits</p></td>" + 
    		" <td width='250' align='center'><p class='counter'>"+orbsmiss+"</p><p>misses</p></td></tr></table>" +
    		"<h2>Continue?</h2>");
    		$(gameover).css("cursor", "pointer");
    	$(gameover).slideDown("slow");
    	$("#hitstats").html(0);
    	$(gameover).click(function() {
    	$(gameover).hide();
    	
    		startNewGame();
    	});
    	
    	$(gameover).prependTo("#jheroboard");
    		}
    		else{
    	$(gameover).html("<img src='images/game-over.png' /><h2>Time up</h2><p>Final Score:</p>" + 
    		"<table align='center'><tr><td width='250' align='center'><p class='counter'>"+NETSCORE+"</p><p>hits</p></td>" + 
    		" <td width='250' align='center'><p class='counter'>"+NETMISS+"</p><p>misses</p></td></tr></table>" +
    		"<h2 style='cursor:pointer;text-decoration:underline;' onclick='share_score();'>Share Score</h2><br><h2 onclick='location.reload(true);'>Retry?</h2>");
    	$(gameover).css("cursor", "pointer");
    	$(gameover).slideDown("slow");
    	
    	
    	
    	$(gameover).prependTo("#jheroboard");
    	}
    Code (markup):
    Thanks,
    Akshat
     
    akshat.gl, Jul 22, 2011 IP
    SEMrush
  2. RootShell

    RootShell Well-Known Member

    Messages:
    855
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    130
    Digital Goods:
    1
    #2
    Hi,
    Under Chrome, use Firebug to know where the error is located, and I can help ;)
     
    RootShell, Jul 28, 2011 IP