Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Czy mogę zablokować takiego div'a javascriptem?
devastraptor
post 11.06.2017, 18:06:14
Post #1





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 12.04.2017

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


Witam, chciałbym zablokować konkretny element na konkretnej stronie za pomocą np. konsoli otwieranej w przeglądarce (chrome) klawiszem F12.

Kod tego elementu jest właśnie taki:

Kod
<div><div data-reactroot="" role="dialog"><div class="modal-backdrop fade in"></div><div role="dialog" tabindex="-1" class="fade in modal" style="display: block;"><div class="modal-dialog"><div class="modal-content" role="document"><div class="modal-header"><button type="button" class="close" aria-label="Close"><span aria-hidden="true">×</span></button></div></div></div></div></div></div></div>


Nie chcę, aby się wyświetlał. Czy jest taka możliwość?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 4)
viking
post 11.06.2017, 18:26:40
Post #2





Grupa: Zarejestrowani
Postów: 6 380
Pomógł: 1116
Dołączył: 30.08.2006

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


CSS. display:none;


--------------------
Go to the top of the page
+Quote Post
devastraptor
post 11.06.2017, 22:36:15
Post #3





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 12.04.2017

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


Cytat(viking @ 11.06.2017, 19:26:40 ) *
CSS. display:none;


hmm.. spróbowałem z takim kodem
Kod
CSS('div > div > div.modal-backdrop.fade').parentNode.parentNode.style.display = 'none';
i błąd jest następujący:
Kod
Uncaught TypeError: Illegal constructor(…)(anonymous function) @ VM203:2InjectedScript._evaluateOn @ VM190:878InjectedScript._evaluateAndWrap @ VM190:811InjectedScript.evaluate @ VM190:667
Go to the top of the page
+Quote Post
wolguy
post 12.06.2017, 11:41:14
Post #4





Grupa: Zarejestrowani
Postów: 219
Pomógł: 10
Dołączył: 9.01.2005

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


prawdopodobnie chodzi o zastąpnienie nazwy funkcja z "CSS" na "$" (czyli jQuery)
Go to the top of the page
+Quote Post
devastraptor
post 12.06.2017, 18:14:48
Post #5





Grupa: Zarejestrowani
Postów: 8
Pomógł: 0
Dołączył: 12.04.2017

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


Problem rozwiązany, wątek można zamknąć smile.gif
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 05:06