Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript]Interakcja z dodanymi elementami
Dapi
post
Post #1





Grupa: Zarejestrowani
Postów: 186
Pomógł: 13
Dołączył: 7.08.2009

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


Witam.
Tworzę link za pomocą:
Kod
document.execCommand('createlink', false, url);


Dalej w kodzie mam:
Kod
$('a').dblclick(function(){
    alert('ok');
});


Niestety działa to tylko dla linków, które są na stronie od samego pocżątku, dla tworzonych dynamicznie za pomocą JS niestety już nie.

Jak sobie z tym poradzić?

Ten post edytował Dapi 15.11.2012, 18:58:32
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
jacobson
post
Post #2





Grupa: Zarejestrowani
Postów: 468
Pomógł: 36
Dołączył: 14.12.2010

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


w google pisza ze execCommand nie jest w pełni kompatybilna ze wszystkimi przegladarkami :

Kod
Here you can follow my ongoing research of execCommand(). This method allows you to execute commands like Copy or Bold. All browsers support it, but obviously there are some differences.

On the whole Opera follows IE's implementation quite closely, while Mozilla and Safari have their own implementations.


Ten post edytował jacobson 15.11.2012, 19:49:37
Go to the top of the page
+Quote Post

Posty w temacie


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: 18.10.2025 - 00:40