Jquery Halp
- Started
- Last post
- 8 Responses
- ESKEMA
var flexsize = $("#central").width();
$('#floater_body').animate(funct...
marginBottom: flexsize
});Why is this not working?
- ESKEMA0
basically I want to animate the margin-bottom with a variable..
I'm not good at jquery so can anyone enlight me?
- orrinward20
Doesn't look like valid animate to me...
http://api.jquery.com/animate/
You need duration e.t.c I would have thought.
EEEEEERRRRRRRRRNNNNNNNNEEEEEEEES...
- kingsteven0
yeah, the first argument should be an object containing the final css parameters etc, not a function...
.animate( {marginBottom: flexsize} );
- then duration, then a function for oncomplete callbackkingsteven
- (optional)kingsteven
- ESKEMA0
HA!
thanks :)
- ESKEMA0
might as well ask something else too :)
Anyone has a solution to implement jQuery Supersized inside a specific div and that the image adapts to that div and not the whole browser window?
- ESKEMA0
^^ I was able to figure this out..
- WrappedInBooks0
I think the call should be:
$('#floater_body').animate({'mar... flexsize});marginBottom is not a css param, and it needs to be in quotes
- I don't know why it collapsed my text. ...animate({'margin...WrappedInBooks
- ESKEMA0
marginBottom is jquery (or javascript, don't know...) and doesn't need to be in quotes. If I would use "margin-bottom" it would also work but it needs the quotes..
- I didn't know that...I went straight to JQ and never learned JS...I prolly should.WrappedInBooks