Hy,
I have added a shortcode to functions.php for inserting javascript only to logged in users. The shortcode is working, only the javascript fails.
I want to do readonly specific input fields (name=your_name and name=your_email) when a user is logged in.
I have made this:
[member]
<script type="text/javascript">
$('input[name$="your-name"]').attr("readonly", "readonly");
$('input[name$="your-email"]').attr("readonly", "readonly");
</script>
[/member]
But it doesnt works :(.
Where I am wrong? What could be the solution?
Thanks forward for answers!