I call a section of another page in to the parent page like this:
$(function() {
$("#subscribe").click(function () {
$("#singleContent").load('purchaseForm.php #Content');
});
});
no problem there. I am having an issue getting functions inside of 'purchaseForm.php' to run. I've tried the ".live" function, but can only bind that to events like click. I need to hide some things and get this code to run:
$('[class^=toggle-item]').hide();
$('[class^=link]').live('click', function(e) {
$('.toggle-item-' + this.className).slideToggle("fast");
$('span',this).text(function(i,txt) {
return txt === "Learn More..." ? "Close" : "Learn More...";
e.preventDefault();
});
});
$(function() {
var $add = $('input.add');
$add.live('click', function() {
$add.removeAttr('checked');
$(this).attr('checked', true);
});
});
How do I bind the above functions to the .load function?