Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [JavaScript]Blokada zdazenia click
atom90
post
Post #1





Grupa: Zarejestrowani
Postów: 172
Pomógł: 0
Dołączył: 11.06.2014

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


potrzebuje funkcje w ktorej nie bedzie mozliwe klikniecie elementu ktory posiada clase ui-state-active
Problem, ze probowalem paru sposobow i nie wychodzilo.
przyklad:
Kod
function clickClear2() {
    
    $("h3").not("ui-state-active").click(function(){
    
    
          clearAcordeon();
        
});
Go to the top of the page
+Quote Post
trueblue
post
Post #2





Grupa: Zarejestrowani
Postów: 6 806
Pomógł: 1828
Dołączył: 11.03.2014

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


$("h3:not(.ui-state-active)").click(function(){
Go to the top of the page
+Quote Post
atom90
post
Post #3





Grupa: Zarejestrowani
Postów: 172
Pomógł: 0
Dołączył: 11.06.2014

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


tez tak nie dzialalo

zrobilem w taki sposob
Kod
function clickClear2() {
    
    $("h3").click(function(){
    if($(this).hasClass('ui-state-active'))
       return;
    else
          clearAcordeon();
        
});

}


i to dziala

gorzej mam z tym motywem
Kod
function clickClear() {
    $("li>a").click(function(){
    if($(this).hasClass('ui-tabs-active'))
       return;
    else{
          clear_status();
         }
});

}


gdzie zdazenie jest na a robione, a clasa aktywnosci przypisywana jest do li. sa,o li click nie dziala...
Go to the top of the page
+Quote Post
com
post
Post #4





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


wklejaj do odpowiedniego bbcode

a $('li','a') itd ?
Go to the top of the page
+Quote Post
trueblue
post
Post #5





Grupa: Zarejestrowani
Postów: 6 806
Pomógł: 1828
Dołączył: 11.03.2014

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


http://jsfiddle.net/4cusg08g/

http://jsfiddle.net/so3bk2t9/
Go to the top of the page
+Quote Post
atom90
post
Post #6





Grupa: Zarejestrowani
Postów: 172
Pomógł: 0
Dołączył: 11.06.2014

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


dzieki
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 23.08.2025 - 02:19