Demonstrators in the Hindu-majority city were angered by a Muslim man who they say threw stones at the temple on Tuesday.
They also accused police of hitting a temple priest in the subsequent unrest.
The man who was accused of throwing stones at the temple has been arrested. His family say he is mentally ill.
Mobile internet services were suspended and state Chief Minister Mehbooba Mufti appealed for calm on Wednesday.
Kashmir: Himalayan flashpoint
Kashmir's once thriving Hindu community
Police said the man accused of desecrating property at the Aap Shamboo temple had been identified as Mohammed Yasir, aged 25.
His brother Tanvir Ahmad told police that Mr Yasir had run away from a nearby psychiatric clinic.
BBC Urdu's Riyaz Masroor says the authorities have taken action against the police officer who slapped the priest.
Police told BBC Urdu that protesters damaged property and threw stones.
A case has been registered against "unknown persons" for rioting.
The Jammu region is Hindu-dominated but Muslims are in a majority in the rest of Kashmir, which is claimed by both India and Pakistan.

The Center for Disease Control (CDC) said 45 people had been infected with a strain of E. coli, 43 of whom reported eating at a Chipotle restaurant.
The cases were in California, Minnesota, New York and Ohio.
Earlier this month, the chain temporarily closed 43 outlets in and around Washington and Oregon states.
This was after health officials investigated an E. coli outbreak that made at least 22 people ill.
"The epidemiologic evidence available at this time suggests that a common meal item or ingredient served at Chipotle Mexican Grill restaurants in several states is a likely source of this outbreak," the CDC said.
"The investigation is still ongoing to determine what specific food is linked to illness."
Chipotle shares are now down by more than a fifth this year, valuing the company at $16.7bn (Â£11bn).
E. coli is short for Escherichia coli. It is a type of bacterium present in the gut of humans and other animals.
Most strains are harmless but some can produce toxins that cause illness in humans.
Police and protesters in Jammu in Indian-administered Kashmir have clashed over the alleged desecration of a local Hindu temple.
[NEXT_CONCEPT]
Shares in Chipotle have slumped more than 12% after US health authorities reported more cases of E. coli linked to the Mexican restaurant chain.