Wondering how to use inline buttons to increment or decrease a property in a database? See the solution—and a fun example—below!

How it Works

To create similar functionality, add three properties to your database:

  1. Number where you store your count
  2. Button for Adding
  3. Button for Subtracting

For 2 and 3, setup your buttons as shown to the right.

current.prop("Number")+1
current.prop("Number")+1

For subtraction, change the  to a

For subtraction, change the + to a -



Demo