i'm trying to create my own tool in javascript, which will help me load some php functions/files into my div.
Here is my javascript:
$(document).ready(function () {
$('.btn').click(function() {
$('#someid').testit();
// $('#someid').load('somefile'); it works
return false;
})
});
function testit() {
$(this).load('somefile');
}
And my html:
<div id="someid"></div>
<form>
<input type="submit" value="test" class="btn" />
</form>
I can't load the resource from external function - why is that?
testit(filename, element), but you can't chain the function to the element.