For my project I was working on. I have a Javascript code snippet that inserts text into an input element with a double-click label.
$(document).ready(function() {
$('#name-label').dblclick(function(){
$("#name").val('[b][color="#FF0000"]Please Submit![/color][/b]');
});
});
But I would like this code to work with multiple fields without copying and pasting the code again and again. I would like the text to stand the same way.
Here are the labels and input id that I would like to use:
Shortcut / Enter
name-label / name
image-label / image
quest-label / quest
price-label / price
ge-label / ge
halch-label / halch
lalch-label / lalch
details-label / details
examine-label / examine
location-label / location
stats-label / stats
keywords-label / keywords
source
share