[jQuery] Problem with jQuery and Typo3
Hi,
i am new, so please be nice :D
Ok i have following problem:
I am trying to implement jquery into an existing typo3 site. jquery.js
is up and running (vers. 1.2.1)
www.op-de-eck.de
my script looks like
$(document).ready(function() {
$('#servicenav a').click(function(){
var linknum = parseInt($(this).attr('href') ,10);
$.get('index.php', {'id':linknum}, function(data){
$('#contentwrapper').empty();
$(data).filter('#contentwrapper');
$('#contentwrapper').append($(data));
});
return false;
});
});
so what i am trying to do is:
- attach click to the servicenav links
- when clicked to corresponding id from index.php is loaded
- the data should be processed so only the content of the
"contentwrapper" div is displayed
- then the data is loaded to the contentwrapper of the actual site
the problem seems to be the filter... i just doesn't work no matter if
i type data oder $(this) or whatever...
find doesn't work either...but if i remove the line with filter, it
works perfect, only that the whole page is loaded into the
contentwrapper not just the content.so it looks ugly :D
thanks for your time!