Currently i am trying to add some jQuery in to my php project i have never worked with jQuery before so i am kind of stuck i have this function that dynamically adds text fields the input fields have some php functions. My question is in what way can i change this so it would work with jQuery. All i can figure out is that the commas are creating the error i tried to rearrange them and even remove them but that did not fix the problem.
<script type='text/javascript'>
$(document).ready(function()
{
$('#button').click(function()
{
$('body').append('<pre><input type="text" name="content_prt1[]" size="50" value="' . str_replace($simbols, "",$part1).'">
<input type="text" name="content_prt2[]" size="50" value="' .str_replace($simbols, "",$part2).'"></pre>'');
});
});
</script>
Is this even the right way of executing this code or am i way off here?
phpin ascriptbut you can havescriptin yourphp