Note that there are some explanatory texts on larger screens.

plurals
  1. POMouse over effects happening simultaneously in all elements
    primarykey
    data
    text
    <p>If the mouse pointer over a div that I want to change the style of two anchor tags under the div and div bg color too. So I just made through jQuery, now that is working fine. But when I added the same div as a duplication then I have another problem, mouse over the effects occurs at a time when the other elements too, becouse the class name is the same, I know that is the reason by haapening like that. I have to keep that class name must be the same. so please teach me how I can fix this, but jQuery.</p> <p>Please see the following jQuery i used, and you can also see the demo too.</p> <pre><code>$(document).ready(function () { $(".custombox").bind({ mouseover: function () { $(".custombox").addClass("custombox' + num++ + '"); $(".custombox a").css("color", "#fff"); $(".deletebtn").css("background-position", "bottom"); }, mouseout: function () { $(".custombox a").css("color", "#333"); $(".deletebtn").css("background-position", "top"); } }); $(window).load(function () { var coordinates = function (element) { element = $(element); var top = element.position().top; var left = element.position().left; $('#results').text('X: ' + left + ' ' + ' Y: ' + top); } $('#custombox').draggable({ containment: "#containment-wrapper", scroll: false, start: function () { coordinates('#custombox'); }, stop: function () { coordinates('#custombox'); } }); $('#custombox2').draggable({ containment: "#containment-wrapper", scroll: false, start: function () { coordinates('#custombox2'); }, stop: function () { coordinates('#custombox2'); } }); $("#custombox2").resizable({ containment: "#containment-wrapper", scroll: false, maxHeight: 250, maxWidth: 350, minHeight: 50, minWidth: 50 }); }); //]]&gt; }); </code></pre> <p><a href="http://jsfiddle.net/vahidrockv/rhY8J/4/" rel="nofollow"><strong>DEMO</strong></a></p> <p>Thanks Vahid</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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