Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript][HTML]motools getElementsByClassName is not a function
casperii
post
Post #1





Grupa: Zarejestrowani
Postów: 681
Pomógł: 28
Dołączył: 14.08.2014

Ostrzeżenie: (0%)
-----


Panowie mam kod:


  1. function load_calendar(el,month,year){
  2. var req = new Request({
  3. async:false,
  4. method: 'get',
  5. url: url_ajax_cal,
  6. data: {
  7. 'id_item':id_item,
  8. 'month':month,
  9. 'year':year,
  10. 'lang':lang
  11. },
  12. evalScripts:true,
  13. onRequest: function() {
  14. el.set('html','<img class="img_loading_month" src="'+img_loading_month+'">');
  15. },
  16. onSuccess: function(response) {
  17. el.set('html',response);
  18.  
  19. $('the_months').getElementsByClassName('.weekend').each(function(el) {
  20. });
  21.  
  22. if(clickable_past=="off"){
  23. $('the_months').getElementsByClassName('.past').each(function(el) {
  24. el.set('opacity','0.6');
  25. });
  26. }
  27.  
  28. }
  29. }).send();
  30. }


konsola krzyczy do tego:
$('the_months').getElementsByClassName('.weekend').each(function(el) {


html:
  1. <li class=" clickable weekend " id="date_2017-07-01" title="1/07/2017 - Wolne" data-date="1/07/2017" style="cursor: pointer; visibility: visible; zoom: 1; opacity: 1;">1</li>

Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 20.08.2025 - 07:16