cannot get text() in new function
Hi,
I'm just starting to use jquery today. I'm using it to get new data from a php file (AJAX).
When I don't use
- "$("#hyves").fadeOut(500,function(){
but I use it without the function
- $("#hyves").fadeOut(500);
I get the clicked text: $(this).text(), but using it the 2th function it doesn't give back a value.
- $(function() {
$("#pages a").click(function(e){
e.preventDefault();// stop normal link click
$("#hyves").fadeOut(500,(function(){
$("#hyves").fadeIn(500);
$.post("http://localhost/tunnelvision/index.php/site/pictures/" + $(this).text(), function(data) {
$("#hyves").html(data);
});//end $.post en function(data)
}));
})
});