  The momentum-weighted sum of the charges of tracks associated to a jet is
sensitive to the charge of the initiating quark or gluon. This paper presents a
measurement of the distribution of momentum-weighted sums, called jet charge,
in dijet events using 20.3 fb$^{-1}$ of data recorded with the ATLAS detector
at $\sqrt{s}=8$ TeV in $pp$ collisions at the LHC. The jet charge distribution
is unfolded to remove distortions from detector effects and the resulting
particle-level distribution is compared with several models. The
$p_T$-dependence of the jet charge distribution average and standard deviation
are compared to predictions obtained with several LO and NLO parton
distribution functions. The data are also compared to different Monte Carlo
simulations of QCD dijet production using various settings of the free
parameters within these models. The chosen value of the strong coupling
constant used to calculate gluon radiation is found to have a significant
impact on the predicted jet charge. There is evidence for a $p_{T}$-dependence
of the jet charge distribution for a given jet flavor. In agreement with
perturbative QCD predictions, the data show that the average jet charge of
quark-initiated jets decreases in magnitude as the energy of the jet increases.
