Month: April 2015

highlight form elements with jquery

//highlight form elements…. document.styleSheets[0].insertRule(“::-webkit-input-placeholder { color: green; font-weight: bold ; background-color:rgba(255,255,255,1); border: 1px solid green}”, 0); $.each($(“input”), function() { if ($(this).attr(‘name’)) { $(this).val(“”);//evtl inhalte loeschen //if ($(this).attr(‘hasDatepicker’)) { //wenn Datepicker, dann Felder vergroessern $(this).removeAttr(“size”); $(this).removeAttr(“maxlength”); //} $(this).attr(“placeholder”,$(this).attr(‘name’)); } }); $.each($(“select”), function() { if ($(this).attr(‘name’)) { $(this).prepend(“”+$(this).attr(‘name’)+””); $(this).css({ color : “green”, fontWeight: “bold” }).val($(this).attr(‘name’)); $(this).val($(this).attr(‘name’)); } …

highlight form elements with jquery Read More »

Martin Rocks