2

I have a html form that have a jQuery plugin tooltip

<div href="#" class="tooltip" title="<img src='<?php echo "admin/".$item['img'] ?>'  width='70' height='70' /><a  style='float:left;margin:19px auto;'  class='button topmenu'>ارسال پیام</a>"><img src="<?php echo "admin/".$item['img'] ?>" alt="user" width="70" height="70"  /></div>

in this code in title I have a link with

<a></a> 

I want when click to this link a popup windows show but I can't do this with this code

$(".tooltip title").click(function()
{
$("#login-box").fadeIn(300);
return false;
});

how can I call this link in title ? when mouse go in 1 number 2 is show I want when I click in link in no 2 my form is apear ..

enter image description here

bragboy
  • 34,892
  • 30
  • 114
  • 171
pencilvania
  • 276
  • 1
  • 4
  • 18

2 Answers2

1

please try the following:

$(".topmenu").click(function() {
    $("#login-box").fadeIn(300);
    return false;
});
Ivan
  • 147
  • 4
0

You should be careful to surround the title HTML attribute with double quotes and use single quotes for the php code. For example:

"<img src="<?php echo 'admin/'.$item['img'] ?>"

instead of:

"<img src='<?php echo "admin/".$item['img'] ?>'

mauro_oto
  • 1,368
  • 17
  • 23