I would try instead of wrapping the jQuery in $(function() { [your function] });
Try function giviitaname() { [your function] }
And in the button:
onclick ="giviitaname()"
I would try instead of wrapping the jQuery in $(function() { [your function] });
Try function giviitaname() { [your function] }
And in the button:
onclick ="giviitaname()"