I wanna update div tag after ajax:
$.ajax({
type: 'GET', // or POST, no difference
url: "<?php echo Yii::app()->createUrl('words/nextWord');?>",
success: function(data) {
// There need add code
}
})
}
After ajax i have response whole page with change change and me need change word in this tags or substitute div. I tried use:
$('#word').load("<?php echo Yii::app()->createUrl('words/nextWord'); ?> #word");
Before code above i had
<span id="word" class="word">dog</span>
After code above i had
<span id="word" class="word">
<span id="word" class="word"> good</span>
</span>