Sha256: 99da0204e34837c060049bf5cb9ab21da3ff45e9e4fd6d1dac81da3d578fee80

Contents?: true

Size: 489 Bytes

Versions: 22

Compression:

Stored size: 489 Bytes

Contents

$(function() {
	$.each($('.clicable_title'), function(index, value) {
		if($(this).val() == '')
		  $(this).val($(this).attr('title'));
	});
	$('.clicable_title').live({
		blur: function() {
			if($(this).val() == '') $(this).val($(this).attr('title'));
		},
		click: function() {
			$(this).select();
			if($(this).val() == $(this).attr('title')) $(this).val('');
		}, 
		focus: function() {
			$(this).select();
			if($(this).val() == $(this).attr('title')) $(this).val('');
		}
	});
});

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
mdd-2.0.1 lib/generators/mdd/sandbox/templates/app/assets/javascripts/mdwa/template/clicable_title.js
mdd-2.0 lib/generators/mdd/sandbox/templates/app/assets/javascripts/mdwa/template/clicable_title.js