  The nanohertz frequency band explored by pulsar timing arrays provides a
unique discovery space for gravitational wave signals. In addition to signals
from anticipated sources, such as those from supermassive black hole binaries,
some previously unimagined sources may emit transient gravitational waves
(a.k.a. bursts) with unknown morphology. Unmodeled transients are not currently
searched for in this frequency band, and they require different techniques from
those currently employed. Possible sources of such gravitational wave bursts in
the nanohertz regime are parabolic encounters of supermassive black holes,
cosmic string cusps and kinks, or other, as-yet-unknown phenomena. In this
paper we present BayesHopperBurst, a Bayesian search algorithm capable of
identifying generic gravitational wave bursts by modeling both coherent and
incoherent transients as a sum of Morlet-Gabor wavelets. A trans-dimensional
Reversible Jump Markov Chain Monte Carlo sampler is used to select the number
of wavelets best describing the data. We test BayesHopperBurst on various
simulated datasets including different combinations of signals and noise
transients. Its capability to run on real data is demonstrated by analyzing
data of the pulsar B1855+09 from the NANOGrav 9-year dataset. Based on a
simulated dataset resembling the NANOGrav 12.5-year data release, we predict
that at our most sensitive time-frequency location we will be able to probe
gravitational wave bursts with a root-sum-squared amplitude higher than $\sim 5
\times 10^{-11}$ Hz$^{-1/2}$, which corresponds to $\sim 40 M_{\odot} c^2$
emitted in GWs at a fiducial distance of 100 Mpc.
