Hi,
I can't get the following jQuery code working without putting alert() function before $.get()
Could you please help me?
Code:
function hae_kommentoitava_teksti_erinomainen() {
randomNum = Math.ceil(Math.random()*10000000);
// alert();
$.get("hae_teksti.php?ID="+ID+"&randomNum="+randomNum, function(data){
var StringInArray = data.split('|');
if(typeof StringInArray[1] == 'undefined')
{
$(".question6").hide();
$(".question7").hide("slide", { direction: "left" }, 1000);
$.doTimeout( 'someid', 1500, function(){
$(".question8").show("slide", { direction: "up" }, 1000);
});
var tarkistuskoodi = 7;
hae_kommentoitava_teksti_kehityskelpoinen(tarkistuskoodi);
}
else
{
$('.kommentoitava_idea').html(StringInArray[0]);
idean_numero = StringInArray[1];
$(".question6").hide();
$(".question7").hide("slide", { direction: "left" }, 1000);
$.doTimeout( 'someid', 1500, function(){
$(".question7").show("slide", { direction: "up" }, 1000);
});
}
});
}
3 replies to this topic
#1
Posted 27 December 2011 - 06:16 AM
|
|
|
#2
Posted 27 December 2011 - 09:47 AM
Are you waiting for jquery to be completely loaded?
put your code inside this
put your code inside this
$(function () {
//Code goes here
});
#3
Posted 27 December 2011 - 10:06 PM
Yeah, my code is already inside it.
Despite of that it's not working...
Despite of that it's not working...
#4
Posted 28 December 2011 - 09:57 AM
If your code is already inside this, it mean, we don't have all your code, and so make it hard to help you... we can only guess
And my only other guess, is that jquery is loaded, but maybe not jqueryUI.
With firefox & firebug, in the net console, do you see the get request?
And my only other guess, is that jquery is loaded, but maybe not jqueryUI.
With firefox & firebug, in the net console, do you see the get request?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









