  Given a smooth, projective variety $X$ and an effective divisor
$D\,\subseteq\, X$, it is well-known that the (topological) obstruction to the
deformation of the fundamental class of $D$ as a Hodge class, lies in
$H^2(\mathcal{O}_X)$. In this article, we replace $H^2(\mathcal{O}_X)$ by
$H^2_D(\mathcal{O}_X)$ and give an analogous topological obstruction theory. We
compare the resulting local topological obstruction theory with the geometric
obstruction theory (i.e., the obstruction to the deformation of $D$ as an
effective Cartier divisor of a first order infinitesimal deformations of $X$).
We apply this to study the jumping locus of families of linear systems and the
Noether-Lefschetz locus. Finally, we give examples of first order deformations
$X_t$ of $X$ for which the cohomology class $[D]$ deforms as a Hodge class but
$D$ does not lift as an effective Cartier divisor of $X_t$.
