/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> // <![CDATA[ $(document).ready( function() { //URL Title js $("input#title").keyup( function() { var titleText = $("input#title").val().replace(/ /g,"_").toLowerCase(); $("input#url_title").val(titleText); }); //Safecracker File js $(".safecracker_file_undo_button").css("display", "none"); $(".safecracker_file_remove_button").click( function() { $(".safecracker_file_input input").removeAttr("disabled"); $(".safecracker_file_thumb").hide(); $(".safecracker_file_undo_button").show(); $(".safecracker_file_remove_button").hide(); var value = $(".safecracker_file_hidden input").val(); $(".safecracker_file_placeholder_input input").val(value); $(".safecracker_file_hidden input").val("NULL"); return false; }); $(".safecracker_file_undo_button").click( function() { $(".safecracker_file_input input").attr("disabled","disabled"); $(".safecracker_file_thumb").show(); $(".safecracker_file_undo_button").hide(); $(".safecracker_file_remove_button").show(); var value2 = $(".safecracker_file_placeholder_input input").val(); $(".safecracker_file_hidden input").val(value2); $(".safecracker_file_placeholder_input input").val("NULL"); ;return false; }); }); // ]]> </script>
Comments
