javascript - Animating invalid element's nearest divs upon form submission -


I have the following code, which is & lt; Select & gt; selects elements that are not selected and save form submissions, if any.

  $ ("form"). Submit (function () selects {var count = 0; var, not value = $ ("select: visible"). (Function () {if (! This.value.length) {sel = this.name ; If (count == 0) {alert ('error' + sel); ++ count;}} return! This.value length;}); Return! Select withNoValue.length;});   

Full code


what is unaffiliated & lt; & lt; Div & gt; It is possible to find ; Select & gt; and 'flash' ( can be a pair of quick flash, or as long as the user does not click inside

Highlighting) What user should modify the entry?

I have tried:

  $ (this) .clostest ("div"). Effects ("Highlights", {}, 3000);   

Using this code does not work - Required & lt; Div & gt; does not flash and this code submits the form even if the selection is not set.

Any ideas how to do that?

You can add a CSS animation like the following:

  .highlight {animation: blinking 1s linear 3; } @fromblink {from {box-shadow: 0 5px 0 # 000; } 50% {box-shadow: 0 0 px 0 000; } {Box-shadow: 0 5px 0 # 000; }}   

using the following script:

  $ ("form"). Submit (Highlight ") {$ (" Highlight "); Class (" Highlight "); Var selectsHoldValue = $ (" Select: Visible "). Filter (function () { Return! This.value;}) selects the closest ('div'). Hathow value. Lang;});   

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -