logo
down
shadow

hover not working for items in list


hover not working for items in list

Content Index :

hover not working for items in list
Tag : jquery , By : Jouni
Date : November 25 2020, 01:01 AM


Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

jquery hover not working on my list items


Tag : jquery , By : user157654
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , Try using the mouseover and mouseout events. I believe your filtering selector was looking for the
  • elements parent?
    $('.category_list li').live('mouseover mouseout', function(event) {
        if (event.type == 'mouseover') {
            alert('I m here');
            $(this).parent().css('text-decoration','underline');
        } else {
            alert('I m gone');
            $(this).parent().css('text-decoration','none');
        }
    });
    
    .category_list.over
    {
        text-decoration: underline;
    }
    
    $('.category_list li').live('mouseover mouseout', function(event) {
        if (event.type == 'mouseover') { alert('I m here'); } 
        else { alert('I m gone'); }
    
        $(this).parent().toggleClass('over');
    });
    
  • IE8 list item hover affect other list items when sub-menu active


    Tag : css , By : Steve O.
    Date : March 29 2020, 07:55 AM
    hop of those help? In IE8, when you adjust the margin-top: -15px, it pushes the UL box top to fit, instead of letting the LI go outside the UL box. So all the other tabs move up to fit the new UL box.
    I suggest setting the non-hover LI to margin-top: 15px and hover LIs to margin-top: 0--reverse it.
    #mainmenu UL LI
    {
        margin-top: 15px;
    }
    
    #mainmenu UL LI:hover
    {
        margin-top: 0;
    }
    

    Why is active hover CSS only working on a few of these list items


    Tag : css , By : mylonov
    Date : March 29 2020, 07:55 AM
    it should still fix some issue The theme uses the :before pseudo-element of the lis to display the icon, while FontAwesome uses the :before of the anchor to do it. You need to move the content (and apply the font-family) from the li element to the anchor, so the theme styles apply. Here's the fix (I also added some rules for the height difference between the two fonts):
    .et-social-icon.fa-soundcloud.fa-2x:before {
        content: "";
    }
    .et-social-icon.fa-2x {
        font-size: 0;
    }
    .et-social-icon.fa-2x a {
        font-size: 30px;
        line-height: 24px
    }
    .et-social-icon.fa-soundcloud a:before {
        content: "\f1be";
        font-family:FontAwesome !important;
    }
    

    Border-bottom below the list items on hover is not working


    Tag : html , By : user182203
    Date : March 29 2020, 07:55 AM
    around this issue I want to have a menu with a green border at bottom of each list item on "hover" and also have the green border bottom in the list item with the class active. But I want that the element inside each list item is vertically and horizontally centered and that with the :hover effect the element remains always at center. , Add the hover to the li instead of the a like this:
    .menu li a {
      color: green;
      font-size: 16px;
      font-weight: bold;
    }
    .menu li:hover {
      border-bottom: 1px solid green;
    }
    
    .menu {
      display: flex;
      width: 100%;
      justify-content: space-between;
      transition: all 200ms ease-out;
      padding: 0;
    }
    .menu li {
      align-items: center;
      border-bottom: 0 solid gray;
      box-sizing: border-box;
      display: flex;
      flex: 1 1 auto;
      height: 59px;
      justify-content: center;
      padding: 5px 0;
      background-color: yellow;
    }
    .menu li a {
      color: green;
      font-size: 16px;
      font-weight: bold;
    }
    .menu li:hover {
      border-bottom: 1px solid green;
    }
    .menu li:hover a {
      color: #000;
      cursor: pointer;
      padding-bottom: 0;
      text-decoration: none;
    }
    .menu .ative {
      border-bottom-color: green;
    }
    <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
    
    <div class="list-container">
      <div class="container">
        <div class="row no-gutters">
          <ul class="menu">
            <li><a href="">Item</a></li>
            <li><a href="">Item</a></li>
            <li><a href="">Item</a></li>
            <li><a href="">Item</a></li>
          </ul>
        </div>
      </div>
    </div>

    ReactJS hover/mouseover effect for one list item instead of all list items


    Tag : javascript , By : Steve O.
    Date : March 29 2020, 07:55 AM
    wish of those help I would make a Task component. You don't want to set the state of the text in the ListView component, because then this.state.text is shared by each task in the map. Each task should be aware of its own hover, and not the hover of the other children.
    class Task extends React.Component {
      state = {
        text: ""
      };
      onMouseOver(e) {
        this.setState({
          text: "delete me"
        });
      }
    
      onMouseOut(e) {
        this.setState({
          text: ""
        });
      }
    
      render() {
        return (
          <li
            onMouseEnter={this.onMouseOver.bind(this)}
            onMouseLeave={this.onMouseOut.bind(this)}
          >
            {this.props.todo} {this.state.text}
          </li>
        );
      }
    }
    
    
    class ShowList extends React.Component {
      constructor(props) {
        super(props);
    
        this.state = {
          newToDo: ""
        };
      }
    
      render() {
        const { text } = this.state;
        return (
          <div>
            <h4>To Do's</h4>
            <ul>
              {this.props.tasks.map(todo => {
                return <Task todo={todo} />;
              })}
            </ul>
          </div>
        );
      }
    }
    
    Related Posts Related QUESTIONS :
  • Validate subset of a form using jQuery Validate plugin
  • jquery how to make insertBefore work only once, on first click?
  • jquery appendTo form
  • Jquery code working in all browsers apart from FF
  • jquery syntax function(){mylongfunc();} vs. just mylongfunc();
  • jQuery.load doesn't execute javascript with document.write
  • Animate hidden hyperlink to display:block
  • jquery ajax call returning error when its not an error
  • Exclude one or more elements from being connected (using connectWith) in jQuery's sortable lists
  • Adding link with existing href
  • jquery cycle plugin divs always stacked problem
  • jquery toggle and fade in one function?
  • JQuery UI Tabs caching
  • Drag and Drop into another div and move in the div only using jquery
  • Links in rounded boxes? In ALL browsers (yep included IE8)
  • How to change the content of the Span using jQuery?
  • jQuery; combine user click and :checked
  • jQuery - Finding the element index relative to its container
  • jQuery .each() function. Resetting the index?
  • jQuery storing settings
  • Why does asp.net mvc form submits itself on button clicks when javascript function error?
  • Linking to non-home panel in JQTouch site
  • How to Edit jQuery Table Using CSS
  • Jquery hover triggers "mouse leave" without cursor leaving
  • DELETE http://localhost:8000/product/[object%20Object] 500 (Internal Server Error)
  • Comparing two string arrays and returning key of not found element using jquery
  • using jquery to change list items is changing all list items, when i want to only change one list item
  • Sending a Json data from my html page to a php
  • Click function to search a specific element in a Json object
  • Bootstrap 4 - Progress Bar Progression
  • how to deleted item materialize chips
  • jQuery - Hide non-active elements using filter()
  • Adding style to string table is not working
  • Github merge multiple files into single compressed master file
  • Replace characters in a field on page load
  • Unable to send data from Form to SQL database
  • If all divs have same style, remove element
  • How to click a jQuery Dialog button in TestCafe
  • Cannot reinitialise DataTable with Angular Datatable
  • How to add Class active on Click in Navbar
  • how to call fail method into jquery.get/post success method?
  • Slider with tabs
  • Jquery Get parent element from data function
  • Ho to put a new line in <p> tag in my jquery?
  • How can I use a text value as a mathematical operator?
  • DataTable columns values showing Only DefaultContent
  • JQuery select dynamically added elements
  • How to change an image source on hover?
  • How to bind jquery event to dynamically added multiple DOM elements?
  • How to get td values and store in array using Jquery?
  • How to add handler to dinamically created tr in JQuery?
  • How to Covert Html to PDF in Jquery?
  • Jquery before() and after() used to create a <div> container not inserting closing tags in after()
  • I want to delete previously added class
  • Open html page in same window after clicking on navlink
  • Datatable is not working when I populate table using smarty
  • How to change image based on the offset top of the content div
  • Find the index of table column with specific id
  • How to return value of $(window).resize()
  • How to optimize adding numerous elements dynamically into web page
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com