Jump to content
php.lv forumi
  • 0

Jquery tiek izaukti nevajadzīgi event


Zefirs

Question

Tātad ir poga kas atver jquery UI dialog logu.

$('#register a').click(function()
   {
       $("#registerbox").dialog("open");	
   });

 

To nospiežot tiek nezināmu iemeslu dēļ izsaukts arī focusout event #reg_username td input[name=username] šim elementam, kas atrodas iekš dialog loga.

$("#reg_username td input[name=username]").focusout(function() 
{	
var reg_username = $("#reg_username td input[name=username]").val();
if (reg_username == '' || reg_username.search(/[^a-zāžšēģīūļķņA-ZĀŽŠĒČĢŅŪĪĶĻ0-9]/) > -1)
 {
 $('#reg_username').addClass('wrong_input');
 valid_inputs = false;
 }
else 
{
 $('#reg_username').removeClass('wrong_input');
}});

 

Kā var piespiest jquery neizsaukt focusout event tad, kad ielādē dialog logu?

Edited by Zefirs
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...