[eluser]jacobson[/eluser]
Hello I have a problem... i have a view which shows the data
Code:
foreach ($records as $item) {
echo "<div id=\"content_main_entry\">(here i want to make a link with the $item->mine inside as a link parameter)
<span class=\"content_main_entry_value\">Value</span></div>
<div id=\"content_main_entry_enroll\">(here i want to make link with id "iwanttoclickthis")Zapis</div>";
}
and now i want to have a script (so I add in the view file the script lines) which will after pressing the a#iwanttoclickthis show the alert with $item->mine
but there is a problem I cant make this in such a way
Code:
[removed]
$(document).ready(function(){
$("a#iwanttoclickthis").click(function(){
var mine = <?php echo $item->mine; ?>;
alert(mine);
});
});
[removed]
because my script does not recognise the $item->mine
how can I make this to work properly