Yes, you can use CSS content
. To switch between the normal text and “Reply!”, put the normal text in a span
and hide that when hovering.
button { width: 6em } button:hover span { display: none } button:hover:before { content: "Reply!" }
<button><span>3 replies</span></button>
Edit: this works in IE8, but not in its compatibility mode, so I assume IE7 is out. Would that be a problem?
Related Posts:
- How to change CSS using jQuery?
- Remove class using jQuery
- How can I scroll to an element using jQuery?
- Bootstrap Dropdown menu is not working
- Change Background color (css property) using Jquery
- Set timeout for ajax (jQuery)
- How to generate a simple popup using jQuery
- Use images like checkboxes
- Adding images to a Bootstrap Carousel with AJAX
- Setting background-image using jQuery CSS property
- Uncaught TypeError: Cannot read property ‘top’ of undefined
- Equivalent of jQuery .hide() to set visibility: hidden
- TypeError: $(…).modal is not a function with bootstrap Modal
- Why is the jquery script not working?
- TypeError: $(…).DataTable is not a function
- Refresh/reload the content in Div using jquery/ajax
- How to get height of div in px dimension
- How to display raw JSON data on a HTML page
- “Uncaught TypeError: a.indexOf is not a function” error when opening new foundation project
- Why is jquery show() not working in example
- jQuery scrollTop() method not working
- Fully responsive HTML5 video
- How to change cursor from pointer to finger using jQuery?
- How can I remove a style added with .css() function?
- How to use aria-expanded=”true” to change a css property
- How to set “style=display:none;” using jQuery’s attr method?
- How do I redirect to another webpage?
- How do I check whether a checkbox is checked in jQuery?
- syntax error: unexpected token <
- Error OPTIONS net::ERR_CONNECTION_REFUSED
- Uncaught ReferenceError: jQuery is not defined [duplicate]
- JQuery – $ is not defined
- Cannot read property ‘push’ of undefined when combining arrays
- How can I get the data-id attribute?
- document.getElementById vs jQuery $()
- How to import jquery using ES6 syntax?
- How to filter an array/object by checking multiple values
- Uncaught SyntaxError: Invalid or unexpected token
- Using Javascript in CSS
- How does the data-toggle attribute work? (What’s its API?)
- Unable to preventDefault inside passive event listener
- Loading local JSON file
- jQuery $.cookie is not a function
- How to check all checkboxes using jQuery?
- Uncaught TypeError: Cannot read property ‘msie’ of undefined – jQuery tools
- Scroll Automatically to the Bottom of the Page
- How do I check if string contains substring?
- How can I select an element by name with jQuery?
- Change CSS of class in Javascript?
- keycode 13 is for which key
- jQuery disable/enable submit button
- How can I get the last character in a string?
- Uncaught TypeError: Cannot read property ‘name’ of undefined
- Dynamically load JS inside JS
- Adding options to a
- How to add an object to an array
- jQuery Ajax POST example with PHP
- Setting and getting localStorage with jQuery
- this vs $(this)
- How to open a URL in a new Tab using JavaScript or jQuery?
- Extract hostname name from string
- how to get the value of a textarea in jquery?
- How do I pass the this context to a function?
- Escaping HTML strings with jQuery
- How to use z-index in svg elements?
- Why define an anonymous function and pass it jQuery as the argument?
- How to scroll an HTML page to a given anchor
- What is the best way to detect a mobile device?
- How to filter JSON Data in JavaScript or jQuery?
- Get querystring from URL using jQuery [duplicate]
- jQuery checkbox change and click event
- jQuery selectors on custom data attributes using HTML5
- TypeError getElementsByTagName is not a function issue
- Creating Accordion Table with Bootstrap
- How to open a Bootstrap modal window using jQuery?
- window.location.replace() not working to redirect browser
- How to check if the URL contains a given string?
- Check if url contains string with JQuery
- jquery to validate phone number
- Closing Bootstrap modal onclick
- stopPropagation vs. stopImmediatePropagation
- What’s a Good Javascript Time Picker?
- Ajax success function
- How can I exit from a javascript function? [duplicate]
- Object doesn’t support property or method ‘addEventListener’
- How to fix javascript .toFixed is not a Function error
- jQuery checkbox checked state changed event
- etect the Enter key in a text input field
- Show post in slider
- Jquery function working in Chrome Console but not in the code [closed]
- How to set callback to execute after all the tinyMCE editors have been initialized?
- Correct way to include extra styles & script files?
- How do I make my wordpress post appear in a mouse hover preview?
- Getting a ‘slide down’ js panel implemented within WP
- Change the version of default style.css in wordpress
- Site images are fixed in front of my site content [closed]
- WP Media Uploader modal conflicts with Bootstrap modal
- Use one javascript variable into another javascript file
- Uncaught ReferenceError: tippy is not defined
- Error – Uncaught TypeError: e.dispatchEvent is not a function