jquery comment form validation errorPlacement ajax return -


i having problem javascript plugins appear conflicting, slightly. if @ fiddle creating form, notice after input field created, deleted, alert messages start popping on next element (below placed).

to clarify: if user has not entered information yet, alerts pop in correct position (floated right side of input field in red text). however, if user has inputted name, deletes name, ajax alert ("this field required") pops in wrong place in field below supposed to. problem appeared after included part of javascript (controls different menu on page):

/* jquery content panel switcher js */ var jcps = {}; jcps.fader = function(speed, target, panel) {     jcps.show(target, panel);     if (panel == null) {panel = ''};     $('.switcher' + panel).click(function() {         var _contentid = '#' + $(this).attr('id') + '-content';         var _content = $(_contentid).html();         if (speed == 0) {             $(target).html(_content);         }         else {                 $(target).fadetoggle(speed, function(){$(this).html(_content);}).fadetoggle(speed);         }     }); }; jcps.slider = function(speed, target, panel) {      jcps.show(target, panel);     if (panel == null) {panel = ''};     $('.switcher' + panel).click(function() {         var _contentid = '#' + $(this).attr('id') + '-content';         var _content = $(_contentid).html();         if (speed == 0) {             $(target).html(_content);         }         else {                 $(target).slidetoggle(speed, function(){$(this).html(_content);}).slidetoggle(speed);         }     }); }; jcps.show = function (target, panel) { $('.show').each(function() {     if (panel == null) {         $(target).append($(this).html() + '<br/>');     }     else {         var trimpanel = panel.replace('.', '');         if ($(this).hasclass(trimpanel) == true){$(target).append($(this).html() + '<br/>');}     } }); } 

thanks help.

i think may right having css conflicts, able close assume desired affect modifying css on label.error elements.

label.error { color: red; position: relative; float: right: top: -30px; } 

example: http://jsfiddle.net/shanabus/kmj87/1/


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -