Hey guys, the following snippet of jQuery code seems to work fine in Google Chrome and Opera, but nothing happens when I try hiding/showing the related div in Internet Explorer or Firefox. Any ideas?
$(function() {
$(".paste-meta-small .right a.collapse").click(function(event) {
$(this).parents(".paste-meta-small").next(".highlight").toggle(500);
$(this).text($(this).text() == 'show' ? 'hide' : 'show');
event.preventDefault();
})
})
$(function() {
$(".highlight-meta a.blog-collapse").click(function(event) {
$(this).parents(".highlight-meta").next(".blog-highlight").toggle(500);
$(this).text($(this).text() == 'show' ? 'hide' : 'show');
var margin = ($(this).text() == "show" ? "15px" : "0");
$(this).parents(".highlight-meta").css("margin-bottom", margin);
event.preventDefault();
})
})
A working example can be found here
Thanks in advance