Donkeys are sometimes labeled as stubborn.  However, the truth is that they are complex thinking animals.  Because they are thinkers, they get bored very easily.  The solution is to have plenty of toys on hand to keep them amused. This may also keep them from cribbing on your fence or barn.
Here is a list of some inexpensive "toys" to keep your donkey amused:

large empty cardboard boxes with staples removed

plastic water or milk jugs half filled with colored water

old garden hose (with metal ends removed)

cotton rope tied in knots (like the large size dog tug toys)

bicycle tire or inner tube (remove any metal fill tubes)

orange traffic cones (very popular toy)

large balls (partially deflate so that your donkey can pick it up)