/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function toggleMessages(id) { $("#msg_wrapper_"+id).slideToggle('slow'); var src = ($("#arrow_"+id).attr("src") === "images/default/community/arrow_red_down.png")? "images/default/community/arrow_red_up.png" : "images/default/community/arrow_red_down.png"; $("#arrow_"+id).attr("src", src); var title = ($("#arrow_"+id).attr("title") === "Expand")? "Collapse" : "Expand"; $("#arrow_"+id).attr("title", title); //$("#arrow_"+id).attr("src","images/default/community/arrow_red_up.png"); }(