Hai everybody,
<div class="whatever styledark myclass"></div>
I'm interested in the search-add class. This can be search-cancel, search-remove I want to get this class name when i click on the div, how i do i change this class name to other classes in the div.
onclick success remove class seaech-cancel and addclass seaech-add.
anybody plz help me.
This is my query function.
$('.search-cancel').click(function(){
var personalId =$(this).find('input[type = "hidden"]').val();
$.ajax({
type : "POST",
cache : false,
url : "/mypeople/addasfriend",
data : {
personalid: personalId ,
},
success: function(data) {
alert('Request Successfully Sended!');
}
});
});
this is my template
<?php foreach($alreadyexist as $al):?>
<?php if($peoples['id']==$al['personal_id']): ?>
<div class="search-cta search-cancel wp-arc">
<input type="hidden" value="<?php echo $peoples['id'] ?>" />
<p>Cancel Request</p>
</div>
<?php $displayed = true; ?>
<?php endif;?>
<?php endforeach;?>