FSN#38679 GUI: on focus van een inputveld het bijbehorende label 'active' maken

svn path=/Website/trunk/; revision=31900
This commit is contained in:
Jos Groot Lipman
2016-12-08 10:18:43 +00:00
parent 27785110e8
commit f48405d4d7
2 changed files with 5 additions and 3 deletions

View File

@@ -658,17 +658,19 @@ $(function () {
});
$(document).on('focus active', 'input,textarea,select',function(){
var thisid = $(this).attr('id');
var thisid = $(this).attr('id')||$(this).attr('name');
if (thisid)
{
$('label[for='+thisid+']').addClass('active');
thisid = thisid.replace(/_show$/, "");
$('label[for='+thisid+']').addClass('active');
}
});
$(document).on('blur', 'input,textarea,select',function(){
var thisid = $(this).attr('id');
var thisid = $(this).attr('id')||$(this).attr('name');
if (thisid)
{
$('label[for='+thisid+']').removeClass('active');
thisid = thisid.replace(/_show$/, "");
$('label[for='+thisid+']').removeClass('active');
}

View File

@@ -1038,7 +1038,7 @@ if (!frontend && srtdisc > -1)
<% if (anykpn)
{
%> <tr class="primsearch noxd">
<td class="label"><label for="kostenplaats"><%=L("lcl_mld_kosten")%>:</label></td>
<td class="label"><label for="kp"><%=L("lcl_mld_kosten")%>:</label></td>
<% // Let op: dit is bewust een wildcardfilter
var kpstr = "";
if (kp_key != -1)