Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax mouseover show function alignment
    text
    copied!<p>I am trying to open a box by using mouseover function, however the box always shows on the right part of the object. Hence when the object is right end of the page, the whole box cannot be seen as shown in this photo. <a href="https://rapidshare.com/files/998669066/problem.png" rel="nofollow">https://rapidshare.com/files/998669066/problem.png</a></p> <p>Here is my ajax code:</p> <pre><code>$(document).ready(function() { $('.date-available').click(function() { alert($(this).attr('id')); }); $('.rezerve-td').mouseover(function() { $(this).children().show(); }).mouseout(function() { $(this).children().hide(); }); }); </code></pre> <p>What should i do in order prevent it? Thanks.</p> <p>Here is the html part of my code:</p> <pre><code>require_once 'class.dates.php'; require_once 'class.generic.php'; require_once 'connection.php'; $query = mysql_query("SELECT * FROM egitim_salonu", $baglanti); while ($row = mysql_fetch_object($query)) { $salonlar[$row-&gt;id] = array('ad' =&gt; $row-&gt;ad, 'detay' =&gt; $row-&gt;detay); } $query = mysql_query("SELECT * FROM salon_rezervasyonu", $baglanti); while ($row = mysql_fetch_object($query)) { $rezervasyonlar[$row-&gt;salon_id.'%'.$row-&gt;gun.'%'.$row-&gt;tip] = array('salon_id' =&gt; $row-&gt;salon_id, 'gun' =&gt; $row-&gt;gun, 'tip' =&gt; $row-&gt;tip, 'rezerve_edildigi_egitim' =&gt; $row-&gt;rezerve_edildigi_egitim); } $month = date('m', strtotime($_POST['d'])); $year = date('Y', strtotime($_POST['d'])); $date = date('F Y', strtotime('01-'.$month.'-'.$year)); if ($month == 1 || $month == 3 || $month == 5 || $month == 7 || $month == 8 || $month == 10 || $month == 12) { $numberOfDays = 31; } else if ($month == 4 || $month == 6 || $month == 9 || $month == 11) { $numberOfDays = 30; } else if (date('L', strtotime($year.'-01-01'))) { $numberOfDays = 29; } else { $numberOfDays = 28; } // Tabloyu aç, başlığı hazırla $output = '&lt;table class="calendar" id="salon-rezervasyon-table"&gt; &lt;thead&gt; &lt;tr&gt;&lt;th rowspan="2"&gt;Salon&lt;/th&gt;&lt;th colspan="'.(2 * $numberOfDays).'"&gt;'.$date.'&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt;'; for ($i = 1; $i &lt;= $numberOfDays; $i++) { $output .= '&lt;th width="10" colspan="2" class="day-th"&gt;'.$i.'&lt;/th&gt;'; } // Başlığı kapat, gövdeyi aç $output .= '&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;'; // Her salon için... foreach ($salonlar as $salonKey =&gt; $salonValue) { $output .= '&lt;tr id="salon-'.$salonKey.'"&gt;&lt;td class="calendar-salon-column"&gt;'.$salonValue['ad'].'&lt;br /&gt;'.$salonValue['detay'].'&lt;/td&gt;'; // ... o ay içindeki günleri kontrol et. Burada kontrol için şunu yapıyoruz: salon id'si, tarih ve gün içerisindeki saati (öğleden önce, öğleden sonra) // birleştirerek bir index (bu index unique bir index) oluşturuyoruz ve bu index yukarıdaki rezervasyonlar dizisinde tanımlanmış mı diye kontrol ediyoruz. for ($i = 1; $i &lt;= $numberOfDays; $i++) { $dateCheck = date('Y-m-d', strtotime($i.'-'.$month.'-'.$year)); $rIndexOO = $salonKey.'%'.$dateCheck.'%Öğleden önce'; $rIndexOS = $salonKey.'%'.$dateCheck.'%Öğleden sonra'; //Öğleden önce if(isset($rezervasyonlar[$rIndexOO])) { $egitimPlaniQuery = mysql_query("SELECT * FROM egitim_plani WHERE id = ".$rezervasyonlar[$rIndexOO]['rezerve_edildigi_egitim'], $baglanti); $egitimPlani = mysql_fetch_object($egitimPlaniQuery); $output .= '&lt;td id="'.$dateCheck.'%o" class="calendar-td rezerve-td"&gt;'; $output .= '&lt;div class="rezerve"&gt;'.date('d-m-Y', strtotime($dateCheck)).' Öğleden Önce&lt;br /&gt;&lt;br /&gt;'.$egitimPlani-&gt;egitim_adi.'&lt;/div&gt;'; $output .= '&lt;/td&gt;'; } else { $output .= '&lt;td id="'.$dateCheck.'%o" class="date-available calendar-td"&gt;'; $output .= ''; $output .= '&lt;/td&gt;'; } //Öğleden sonra if(isset($rezervasyonlar[$rIndexOS])) { $egitimPlaniQuery = mysql_query("SELECT * FROM egitim_plani WHERE id = ".$rezervasyonlar[$rIndexOO]['rezerve_edildigi_egitim'], $baglanti); $egitimPlani = mysql_fetch_object($egitimPlaniQuery); $output .= '&lt;td id="'.$dateCheck.'%s" class="calendar-td rezerve-td"&gt;'; $output .= '&lt;div class="rezerve"&gt;'.date('d-m-Y', strtotime($dateCheck)).' Öğleden Sonra&lt;br /&gt;&lt;br /&gt;'.$egitimPlani-&gt;egitim_adi.'&lt;/div&gt;'; $output .= '&lt;/td&gt;'; } else { $output .= '&lt;td id="'.$dateCheck.'%o" class="date-available calendar-date-separator"&gt;'; $output .= ''; $output .= '&lt;/td&gt;'; } } $output .= '&lt;/tr&gt;'; } $output .= '&lt;/tbody&gt;&lt;/table&gt;'; echo $output; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload