Greetings to all. I have a div on the mouse cursor, I want to change the border of the div. And on the other id changes dynamically. Please provide me any help for this. Thanks.
can it help you
<div onmouseover="somefunction(<?php echo $divid ?>)"> </div> <script> function somefunction(id) { document.getElementById(id).style.border="10px #FF0000 solid"; } </script>
It does not do the trick?
div {} div:hover {border:1px solid #000000;}
, , javascript, :hover. IE : , .
:hover
, div, jQuery . , , .
- :
$(function(){ $('.yourclass').hover( function(){ $(this).addClass('hovered'); }, function(){ $(this).removeClass('hovered'); } ); });
, , css .
, $(this).attr('id','newID');
$(this).attr('id','newID');
CSS provides a: hover selector that should work with a div.
eg:
div:hover { border: 1px solid #454545; }
As for dynamically changing id, I would use jQuery
jQuery(this).attr("id",newId);
If you post specific code, I can help with the syntax for your specific case ...
Source: https://habr.com/ru/post/1776454/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1776449/can-php-be-used-to-make-desktop-application-or-only-make-web-based-application&usg=ALkJrhhmEG2oCguQ3oiuWJ30DJ5R0chg-gПримеры использования Websphere x JSR 286 - javaradio button in jquery ui accordion title makes it not respond - jqueryphp: read attribute from form element - htmlOne value constructor belonging to two different types - typestinymce is incompatible with jquery ajaxsetup datafilter - jquerywork with wordpress from Delphi - apiOffer a database schema for a widget driven site - databaseRuby: To create a string cache that is faster: Array or SQL? - arraysCan I use the Wordpress API to create posts on wordpress.com? - apiAll Articles