Response title
This is preview!
I have a small admin panel where i can delete items, if used an jquery animation and hide function when i click on the delete button, but when i click on the button the jquery works perfect but for some resaon the php delete function doesnt work(if tryed a basic link, like index.html, but this doesnt works)
When i click the btn the page doesn't refresh, anybody have a solution for this?
This is the jquery code
- // remove a row
$(".delete-row").click(function() {
$(this).parents('.pages-row, .user-row, .media-row')
.effect("highlight", {}, 100).animate({
opacity: 0
},function () {
$(this).hide();
});
$(this).parents(".pages-row, .user-row").next("div").hide();
return false;
});
$(".nl").click(function(){
$("div.lang_english").fadeOut("fast", function() {
$(this).fadeIn("fast").removeClass("lang_english").addClass("lang_dutch");
});
});
$('#hi-ind').click(function(){
$('.hi-logo').fadeTo("slow", 0.10);
$('.hi-web').fadeTo("slow", 0.10);
$('.hi-grap').fadeTo("slow", 0.10);
$('.hi-ind').fadeTo("slow", 1.0);
});
/* toggle selected box */
$(".content-header-right").click(function(){
$(this).parents(".content-header").next(".content-in").slideToggle("slow");
// get the id of the box
var id = $(this).parents(".content-header").next(".content-in").attr('id');
if ($(this).find('a.toggle-close-btn').is(":hidden")){
$(this).find('a.toggle-close-btn').show();
$(this).find('a.toggle-open-btn').hide();
$.cookie(id, 'show');
} else {
$(this).find('a.toggle-open-btn').show();
$(this).find('a.toggle-close-btn').hide();
$.cookie(id, 'hide');
}
});
// toggle hiddenmenu
$("a#toggle-open-btn, a#toggle-close-btn").click(function () {
if ($("#toggle-box-1").is(":hidden")) {
$("#toggle-box-1").slideDown("slow");
$("#topmenu").slideToggle("slow");
$.cookie('showTop', 'collapsed');
return false;
} else {
$("#toggle-box-1").slideUp("slow");
$("#topmenu").slideToggle("slow");
$.cookie('showTop', 'expanded');
return false;
}
var showTop = $.cookie('showTop');
if (showTop == 'collapsed') {
$("#toggle-box-1").show();
$("#topmenu").hide();
};
if ($('#toggle-close-btn').is(":hidden")){
$('#toggle-close-btn').show();
$('#toggle-open-btn').hide();
} else {
$('#toggle-open-btn').show();
$('#toggle-close-btn').hide();
}
});
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5 (click)</td>
</tr>
<tr class="toggle">
<td colspan="5">lorem ipsum..........</td>
</tr>
</table>
<div class="comments-box">
<div class="profile-comment-bg">
<img src="images/profile.jpg" alt=""/>
</div>
<div class="comments-right">
<p class="com-name">title</p>
<p>content</p>
<p class="c"><a class="edit-comments" href="#">Edit</a></p>
<p class="comments-date">2009/06/16 at 12:15pm</p>
</div>
<div class="comments-toggle">toggle this box</div>
</div>
$(".edit-comments").click(function () {
$(this).next(".comments-toggle").slideToggle("fast");
});
$(".toggle").click(function(){
var id = $(this).attr('id');
$("#toggl"+ id).slideToggle("slow");
if ($('.close').is(":hidden")){
$(".close").show();
$(".open").hide();
} else {
$(".open").show();
$(".close").hide();
}
});
<div class="box-780-head">
<h3>Box 1</h3>
<a href="#" class="toggle" id="e1">
<img src="toggle-plus.jpg" class="close" alt=""/>
<img src="toggle-min.jpg" class="open" style="display:none;" alt=""/>
</a>
<img src="delete.jpg" class="delete" alt=""/>
</div>
<div class="box-780-body" id="toggle1">toggle content</div>
$(".del").click(function() {
$('div.floating-box').remove();
});
<div class="floating-box">
<div class="box-780-head">
<h3>Box 1</h3>
<a href="#" class="toggle"><img src="images/icons/toggle-plus.jpg" alt=""/></a>
<a href="#"><img src="images/icons/delete.jpg" class="del" alt=""/></a>
</div>
<div class="box-780-body">lorem......</div>
</div>
<div class="floating-box">
<div class="box-780-head">
<h3>Box 2</h3>
<a href="#" class="toggle"><img src="images/icons/toggle-plus.jpg" alt=""/></a>
<a href="#"><img src="images/icons/delete.jpg" class="del" alt=""/></a>
</div>
<div class="box-780-body">lorem......</div>
</div>
<div class="floating-box">
<div class="box-780-head">
<h3>Box 3</h3>
<a href="#" class="toggle"><img src="images/icons/toggle-plus.jpg" alt=""/></a>
<a href="#"><img src="images/icons/delete.jpg" class="del" alt=""/></a>
</div>
<div class="box-780-body">lorem......</div>
</div>
...............................
...............................
...............................
jQuery.fn.overl = function(classe) {
$(this).hover(function(){
$(this).find(classe).stop().animate({height:'70px',opacity: '0.9'},400);
},function () {
$(this).find(classe).stop().animate({height:'0',opacity: '0'}, 400);
});
}
$('.cycle-wrap').overl('.overlay-1, .overlay-2, .overlay-3');
$('.cycle-wrap').overl('.overlay-1');
© 2013 jQuery Foundation
Sponsored by and others.