angularjs - Javascript and AngularJS2. Why javascript script fires too early and suppose not working. -


i have problem javascript script. have programmed in javascript , problem hadn't shown up. writing website angular , javascript , not working quite well. first when trying put <script></script> in component template not run. next problem forced put link external script in index , script looks that:

$(window).load(function() {     $(".home_page_well").css({opacity:0.5});     $("#system_epop_h6").hide();     $("#kto_moze_korzystac_h6").hide();     $("#co_zrobic_uzytkownik_h6").hide(); }); 

html looks that:

<div class="col-sm-12 home_page_well system_epop">                 <img src="assets/img/question_mark.png"  alt="co jest?" class="img-rounded home_img center-block"/>                  <h4>                     czym jest system epop?                 </h4>                 <h6 id="system_epop_h6">                     system epop jest platformą pozwalającą na łatwy dostęp wszystkich danych, które posiada przychodnia. upraszcza także rejestrację lekarza                 </h6>             </div>             <div class="col-sm-12 home_page_well kto_moze_korzystac">                 <img src="assets/img/question_who.png"   alt="question_who" class="img-circle home_img center-block"/>                  <h4>                     kto moŻe korzystaĆ z epop?                 </h4>                 <h6 id="kto_moze_korzystac_h6">                     wszyscy pacjenci przychodni także jej pracownicy.                 </h6>             </div>             <div class="col-sm-12 home_page_well co_zrobic_uzytkownik">                 <img src="assets/img/palm_shake.png"  alt="palm_shake" class="img-circle home_img center-block"/>                  <h4>                     co zrobiĆ, aby staĆ siĘ uŻytkownikiem systemu                 </h4>                 <h6 id="co_zrobic_uzytkownik_h6">                     należy się zarejestrować poprzez panel pacjenta, lub zadzwonić przechodni wtedy wszystkie operacje przeprowadzi wykwalifikowany personel.                 </h6>             </div> 

bootply: http://www.bootply.com/oehsnapycz

site about: http://www.iqdrone.pl/dpawlik/eprzychodnia/#/logowanie

i thankfull if me. problem, why script won't run in component template url. in advance :)

use timeout function in jquery, delays event occur.

settimeout(function(){  	 $(".home_page_well").css({opacity:0.5})  	 $("#system_epop_h6").hide()  	 $("#kto_moze_korzystac_h6").hide()  	 $("#co_zrobic_uzytkownik_h6").hide()  }, 1000);

thats it, script firing problem resolved.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -