I have a page which has anchor tag clicking on which ma div tag toggles. I want to make whole body of page black or shaded except that Div tag.
Well then you need to set body's background color first and then your div's background. So make function toggle
which would check for presence of class in both elements and then ether add or remove class attribute (for both elements) with $('#mydiv').addClass('foo')
or $('#mydiv').removeClass('foo')
. Then you can use CSS to declare background colors for body and then div: add class - color in, remove class - color out
It sounds like you really want a "Modal Dialog" type of display. There are a number of JQuery and other methods to do this.
Here is a good one that I've used before, Simple Modal
I want to make it look like lightbox effect but there should be no pop up. i tried jquery popeye but it didnot help,
I even tried to put animate with opacity on click of link but it blurs my div tag which I want to display.
thanks