Home  >  Article  >  Web Front-end  >  How to clear element max-width (maximum width) in jquery

How to clear element max-width (maximum width) in jquery

青灯夜游
青灯夜游Original
2022-04-27 20:03:033145browse

Method to clear max-width: 1. Use css(), syntax "$("specified element").css("max-width","none")"; 2. Use attr() , the syntax is "$("specified element").attr("style","max-width:none;")".

How to clear element max-width (maximum width) in jquery

The operating environment of this tutorial: windows7 system, jquery1.10.2 version, Dell G3 computer.

The max-width style of the element

The max-width attribute sets the maximum width of the element.



  
    
  

How to clear element max-width (maximum width) in jquery

How to clear element max-width (maximum width) in jquery

Method 1 : Use css() to set the value of max-width to none



	
		
		
		
		
	


How to clear element max-width (maximum width) in jquery

2. Use attr() to set the value of max-width to none



	
		
		
		
		
	


How to clear element max-width (maximum width) in jquery

【Recommended learning: jQuery video tutorial, web front-end video

The above is the detailed content of How to clear element max-width (maximum width) in jquery. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn