1

CODE:

<ul class="ul_list" style="height: 300px;resize:both;">

How do I find that using JQuery in a page and remove resize:both. I can't do it manualy. Please advise.

1
  • Do you have multiple ul_list elements? Commented Sep 20, 2013 at 21:55

4 Answers 4

3

From http://api.jquery.com/css/:

Setting the value of a style property to an empty string — e.g. $( "#mydiv" ).css( "color", "" ) — removes that property from an element if it has already been directly applied, whether in the HTML style attribute, through jQuery's .css() method, or through direct DOM manipulation of the style property. It does not, however, remove a style that has been applied with a CSS rule in a stylesheet or element.

$('.ul_list').css('resize','');

And, just because I love fiddles: http://jsfiddle.net/CFCGV/

Sign up to request clarification or add additional context in comments.

Comments

0
$('.ul_list').css({'resize':'none'});

Comments

0

You won't be able to completely remove the style, but you can set it back to the default using something like:

$(document).ready(function(){
    $('.ul_list').css('resize':'none');
});

1 Comment

Assumption was only reason to use an inline style is to override another in a stylesheet. Barbara also specified this so it's a better explanation.
0

Never use inline styles in your code, CSS have specificity and cascading nature.

move the resize:both to the external css file, and if you want to change any time, use another css class, and add the class using JavaScript.

This video will be helpful for you http://www.youtube.com/watch?v=SLC83iesr60

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.