ziedinjsh Posted November 13, 2010 Report Share Posted November 13, 2010 function toggle_visibility(id) { var e = document.getElementById(id); if(e.style.display == 'none') e.style.display = 'block'; else e.style.display = 'none'; } tagad atverot lapu DIV ir vaļā.. uzspiežot uz linka tad viņš aizveras.. vajag lai atverot lapu DIV ir ciet! kas jādar? Quote Link to comment Share on other sites More sharing options...
briedis Posted November 13, 2010 Report Share Posted November 13, 2010 Tas jādara ar CSS. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 13, 2010 Report Share Posted November 13, 2010 Tas nav PHP...! kas jādar? Tā Tu nekur tālu netiksi. Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 13, 2010 Author Report Share Posted November 13, 2010 Tas jādara ar CSS. echo "<div id='report'>"; echo "<div class='title'><a href='#' onclick='toggle_visibility(".$data['id'].");'>".$data['title']."</a></div>"; echo "<div class='date'>".$data['date']."</div>"; echo "<div class='fix'></div>"; echo "<div id='".$data['id']."' class='message'>".$data['message']."</div>"; echo "<div class='remail'>".$data['email']."</div>"; echo "<div class='delete'><a href='delete.php?del_report=".$data['id']."'>Delete</a></div>"; echo "<div class='fix'></div>"; echo "</div>"; #report{ border:1px solid #161B1F; padding:5px; margin-bottom:5px; } #report .title{ font-size:20px; width:500px; float:left; font-weight:bold; font-family:arial; } #report .date{ border-left:1px solid #161B1F; padding-left:5px; font-size:12px; float:right; } #report .message{ font-size:16px; border-top:2px solid #161B1F; padding:5px; } #report .remail{ border-top:1px solid #161B1F; float:left; } #report .delete{ border-top:1px solid #161B1F; float:right; } #report .delete a{ text-decoration:none; color:#ff0000; cursor:pointer; } kā lai to izdara ar css? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 13, 2010 Report Share Posted November 13, 2010 Tas ir ar JavaScript jāveido. Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 13, 2010 Author Report Share Posted November 13, 2010 viens sak ka ar css otrs ar javascript.. ar kuru tad īti un kā? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 13, 2010 Report Share Posted November 13, 2010 Ar HTML, CSS un JS. xD Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 13, 2010 Author Report Share Posted November 13, 2010 jā labi :D bet kas tad man jādara ir? :D Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted November 13, 2010 Author Report Share Posted November 13, 2010 lab.. es sapratu kas jādaera :D tomēr bija ar css :p Quote Link to comment Share on other sites More sharing options...
briedis Posted November 13, 2010 Report Share Posted November 13, 2010 Kas tu nemāki elementam pielikt CSS klāt kur display:none būs? Quote Link to comment Share on other sites More sharing options...
daGrevis Posted November 14, 2010 Report Share Posted November 14, 2010 http://paste.php.lv/0c9b1726147b34152dfd362e46399188?lang=php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.