Web.QHMIT
.com
Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
Run
<!DOCTYPE html> <title>My Example</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script> $( function() { $( "p" ).click( function() { $( this ).css( { "background": "gold", "font-size": "+=1.5em", "padding": "+=10" } ); }); }); </script> <p>Click me.</p> <p>Using jQuery relative values such as <code>+=1.5em</code> adds that amount to the current value.</p> <p>Clicking the element continuously will result in the value being incremented continuously.</p>
Preview