Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8832507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:32:51+00:00 2026-06-14T08:32:51+00:00

I am using Twitter Bootstrap and the uploadify library. I have got the button

  • 0

I am using Twitter Bootstrap and the uploadify library.

I have got the button uploadify creates styled using buttonClass: 'btn btn-primary' and I resize the object (which does not take into account padding etc by itself) using:

var uploader = $('#document_upload_'+variant_id);
var button = $('.uploadify-button', uploader);
var swfobject = $('object', uploader);

swfobject.css({
    height: button.outerHeight(),
    width: button.outerWidth()
});

Which all works great, the only problem is that we lose the hover styles on the button.)
So, we need to style the button using it’s hover styles when the object is hovered over.

I am aware that the below won’t work:

swfobject.hover(
    function(){button.mouseover();}, 
    function(){button.mouseleave()}
);

But as this is being used in a general setting, where all the sites are using bootstrap, but they are styled differently (and I cannot modify the core bootstrap files) I cannot simply apply another class, that has the same as the hover pseudo classes.

So, is there a way in jQuery to copy an elements “hover styles”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T08:32:53+00:00Added an answer on June 14, 2026 at 8:32 am

    Is there a way in jQuery to copy an elements “hover styles”?

    Not easily. You could listen to jQuery.hover() and use jQuery.css() to get the custom CSS, iterate over styles in document.styleSheets or you could try a library like jss:

    jss('.button:hover').get()['color']
    

    JSS JSFiddle: http://jsfiddle.net/7kEJ9/2/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Twitter Bootstrap's bootstrap-tab.js, I have: <ul class=tabnavcenter id=myTab> <li class=active><a href=#home data-toggle=tab>about</a></li> <li><a
I have been using twitter bootstrap to build a small blog site for myself
I am using twitter bootstrap and have a fixed nav bar. The navbar has
I'm using Twitter Bootstrap, and have a Google map. Images on the map, such
I am using Twitter Bootstrap and at one place I have nested fluid-grid in
I'm using twitter bootstrap with less and I have the following: @serifFontFamily: 'Droid Serif',
We are using Twitter Bootstrap for my application. I have situation where I have
I am using Twitter bootstrap for the CSS of a page where I have
I am using twitter bootstrap and will_paginate, and I have a table on which
I am using twitter bootstrap but have a problem with the nav bar height

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.