How can I make my external jquery file working as I indend?
on page load, the parent div of copyright should change in width and
center. this div on every page does not have an ID or class for some
reason. So I am using this code below in a javascript file that is linked
at the top of my page
(function(){
$("#copyright").parent().css({
'margin-left':'auto',
'margin-right':'auto',
'width':'900px'
});
})();
but I see no results. However, when I post this into the google chrome
console log, the desired effect happens, which is the centering of the
DIV.
Why is this not working in my external file?
No comments:
Post a Comment