We present a new approach to analysing the dependence of quasar variability on rest-frame wavelengths. We exploited the spectral archive of the Sloan Digital Sky Survey (SDSS) to create a sample of more than 9000 quasars in the Stripe 82. The quasar catalogue was matched with the Light Motion Curve Catalogue for SDSS Stripe 82 and individual first-order structure functions were computed. The structure functions are used to create a variability indicator that is related to the same intrinsic timescales for all quasars (1 to 2 yr in the rest frame). We study the variability ratios for adjacent SDSS filter bands as a function of redshift. While variability is almost always stronger in the bluer passband compared to the redder, the variability ratio depends on whether strong emission lines contribute to either one band or the other. The variability ratio-redshift relations resemble the corresponding colour index-redshift relations. From the comparison with Monte Carlo simulations of variable quasar spectra we find that the observed variability ratio-redshift relations are closely fitted assuming that (a) the r.m.s. fluctuation of the quasar continuum follows a power law-dependence on the intrinsic wavelength with an exponent -2 (i.e., bluer when brighter) and (b) the variability of the emission line flux is only about 10% of that of the underlying continuum. These results, based upon the photometry of more than 8000 quasars, confirm the previous findings by Wilhite et al. (2005) from 315 quasars with repeated SDSS spectroscopy. Finally, we find that quasars with unusual spectra and weak emission lines tend to have less variability than conventional quasars. This trend is opposite to what is expected from the dilution effect of variability due to line emission and may be indicative of high Eddington ratios in these unconventinal quasars.