A MAN dodged jail after threatening his ex-partner while helping get children ready for their first day of school.

William Cartledge also appeared in the dock for trying to hit a police officer on the head with a Samsung tablet and trying to bite two other cops.

Glasgow Sheriff Court was told how the 29-year-old went to his ex's home in Cranhill around 8am on August 12 last year to help get children in her care ready.

He needed to go to a nearby school to collect a tie for one of the children and when he returned his "mood had changed".

Depute fiscal Lauren Ram Sangray told how Cartledge went on to the victim's tablet to look through her calls and messages and started to accuse her of being unfaithful.

She asked him to stop and tried to grab the tablet but he threw it on the ground, causing the screen to smash.

He also grabbed a glass and threw it, causing that to also smash.

Cartledge shouted: "Ya cow, ya rat, stop sleeping with my pals, ya rat."

In a separate incident on November 13 last year at Inveresk Street in Greenfield, police were called out to a disturbance.

Cartledge was there and became aggressive, shouting and swearing and telling the police to "f*** off".

The situation escalated and Cartledge tried to strike a police officer over the head with a Samsung tablet in the living room of the property but the cop pushed him back.

He then tried to bite the police officers and an additional set of handcuffs had to be applied for their safety.

When he was cautioned, Cartledge said: "I'll admit to that, no biggie" and added, "I never tried to bite any police officer, I swear on that."

His defence brief told the court it was "completely unacceptable behaviour and he is to be punished."

But the lawyer added that his client has not been in any trouble since and is currently working as a labourer for an interiors company.

Sheriff Patricia Pryce said: "You were given an opportunity by the court to be of good behaviour.

"This was a particularly nasty [incident] in respect of your ex-partner and you then went on to attempt to assault three police officers who were simply doing their job."

Sheriff Pryce said this was "wholly unacceptable".

She added: "You wouldn't like to go to your work and be assaulted.

"They have an expectation they can go to work and be safe.

"Given what's been going on in the world, the past 18 months their job has been particularly difficult."

Cartledge was put on a community payback order with 15 months supervision and ordered to carry out 252 hours of unpaid work.