I have a function where you click on something and then a resizable div toggles with content loaded (.load function).
$("#menucontent").load("loader.php?c=menup");
$("#menucontent").draggable();
$("#menuc").click(function(){
$("#menucontent").toggle(); //
$("#menucontent").resizable();
});
Basically this loads the data from loader.php to the div with id menuc. So far so good.. Data retrieved from loader.php :
echo '<a class="offertezoek" href="#">ZOEK OFFERTE<div style="display:none;" id="offertezoek"><input type="text" id="offertezoek" name="offertezoek">TEST</div></a><br /><br />';
Now the problem comes, I want to create a function for the data loaded. The data gets loaded but the function does not work.
Is this because the page is already ready and Jquery executed all the javascript before the data was in the div offertezoek (got added afterwards with .load("loader.php") ??
NEW FUNCTION :
$(".offertezoek").click(function(){
$("#offertezoek").toggle(); //
});