Jump to content

click to id from external html, append


php_guest

Recommended Posts

When user click on Click me, one.html is loaded. Inside this html is <p id="test">Click me2 </p>. I want that after user click on Click me 2 (which appers after he click on first Click me) that second action append <p>third</p>' to #include2 (this id is from one.html).

 

Is even possible to do that? Now when I click on Click me 2 nothing happen, like there is no second click function.

 

I want to append <p> include on click a <p id="test"

$(function() {

            $('#clickme').click(function() {
                $('#include').load('one.html');
            });

            });


            $('#test').click(function() {
                $('<p>third</p>').appendTo('#include2');
            });
            });

Link to comment
https://forums.phpfreaks.com/topic/160722-click-to-id-from-external-html-append/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.