jquery - Deactivate popover over form in modal bootstrap -


I'm new to bootstrap.

I am trying to create a membership form, and when I get an indication that an area is not correct, thanks for the popover. I have forced a blurred event in my area when the event is removed, so I check with a Rijkspepe if the field looks correct, if not, then I print popovers. works fine :). Now, the user comes back to fix the error, so I bind the input event, and every time he enters a letter, I check with regexp again and if it is correct, then I Close the popover. Work very well.

Now my problem is, if the user clicks on the field after that second step (i.e. the mistake is fixed), the popover appears again ... I have tried to bind This is not working on click event to hide pops again.

  $ ("# inscriptionmail"). Dam ('blurred', function () (if (! Remail.test ($ ("# inscriptionmail"). Val ())) {console.log ("email invalide"); $ (this). Popover ('show ');}});    

try it

  $ (document). Ready (function () {var revolve = / ^ (([^ ^ <<), [\] \\.,;: \ S @ \ "] + (\. ^ ^  & gt; () [\] \\,;: \ s @ \ "] +) *) | (\" + \ ")) @ ((\ [[0-9] {1,3} \ [0-9] {... 1,3} \ [0-9] {1,3} \ [0-9] {1,3} \]) | .. (.. ([a-zA-Z \ -0-9 ] \ [A-zA-Z] {2,}) $ / "$ (" # inscriptionmail ") dam ('blurring, function) (if (!! Remail.test ($ (" # inscriptionmail ") Val ())) {console.log ("email invalide"); $ (this) .attr ("data content", "email invalide"); $ (this). Popover ('show'); return;} $ (This) .popover ('hide');}); $ ("# inscriptionmail"). Bind ('input', function) (if (remail.test ($ ("# inscriptionmail"). Val ()) ( ) "Console.log (" email valide "); $ (this) .attr (" Data-content "," Email Valid "); $ (this). Popover ('hide'); Return $ (This) .attr ("data-content", "email invalide");}); $ ("# inscriptionmail"). Bind ('click', function) {if (remail.test ($ (" $ Inscriptmail ") .val ()) {console.log (" email valid "); $ (this) .attr (" data-content "," email walied "); $ (this). '); Return; } $ (This) .attr ("data-content", "email invitation"); }); });   

Please, check this question:

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -