guys. Can I use a function like an attribute in jQuery .setProperty?
jQuery(document).ready(function(){
jQuery(".content-wrapper").mouseenter(function(){
jQuery(this).find('.separator-content-box').each(function(){
this.style.setProperty( 'width', jQuery(jQuery('.content-wrapper').width() - jQuery('.heading').width()), 'important' );
this.style.setProperty( 'border-color', 'red', 'important' );
});
});
In futher questions please provide us the CSS and HTML pieces related to have a whole view to your case.
In jQuery i recommend to use the ´css()´ function to add inline styles to elements. Your code should be something like this:
I dont know your HTML/CSS structure, but there is a test i did to try: https://jsfiddle.net/97fjbp12/
Note: To do calculations you just need add
(
and)
to make it working.