Return to Snippet

Revision: 51097
at September 14, 2011 07:44 by bitsculptor


Initial Code
<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>

Initial URL

                                

Initial Description

                                

Initial Title
Javascript (jQuery) markup for saef in expression engine

Initial Tags
jquery

Initial Language
jQuery