Jump to content
php.lv forumi
  • 0

neatrod elementu


anonīms

Question

<form id="profile_form_profile">
<div>
<fieldset></fieldset>
<div class="last"></div>
<fieldset></fieldset>
<div class="last"></div>
<fieldset></fieldset>
<div class="last"></div>
</div>
</form>

 

$("#profile_form_profile .last_div").after('yo')
$("#profile_form_profile div .last_div").after('yo')
$(".last_div").after('yo')

 

kādēļ nekas netiek atrasts? konsole neko neizmet. Skaitot ar length izmet 0 elementus. Kur problēma?

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

<form id="profile_form_profile">
<div>
<fieldset></fieldset>
<div class="last_div"></div>
<fieldset></fieldset>
<div class="last_div"></div>
<fieldset></fieldset>
<div class="last_div"></div>
</div>
</form>

šādi ar izskatās. liekot after() pēc katra div atrod viņu, bet ejot tiešāk gan vairs nē.

mēģināju gan pirms, gan pēc rATRIJS, nelīdz.

Link to comment
Share on other sites

  • 0

Nezinu, kas domāts ar mēģināšanu gan pirms, gan pēc, bet pamēģini ielikt savu kodu šajā kodā iekšā

$(function(){
...
});

tur kur daudzpunktes

 

Un paskaidro, ko nozīmē "ejot tiešāk"?

Link to comment
Share on other sites

  • 0

indoom, paldies nevajag :) mans kods ir izraukts no konteksta un tik zaļš ar neesmu :D

 

tiešāk?

$("#profile_form_profile").after('yo') atrod

$("#profile_form_profile div").after('yo') atrod

$("#profile_form_profile .last_div").after('yo') neatrod

$("#profile_form_profile fieldset").after('yo') atrod

Link to comment
Share on other sites

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...