.width() and .height() can also set the value.

What is being passed to showAjaxLoader? Could you post an example page
or at least some of the surrounding code?

--
Brandon Aaron

On 4/26/07, Steve Blades <[EMAIL PROTECTED]> wrote:
.width() and .height() are used to get the w and h values. You would use
$([selector]).css("[attr]":"[value]") to set a style value.

Steve 'Cutter' Blades
Adobe Certified Expert
Advanced Macromedia ColdFusion MX 7 Developer

____________
http://blog.cutterscrossing.com

"The best way to predict the future is to help create it"

On 4/26/07, juliandormon <[EMAIL PROTECTED]> wrote:
>
> I am simply trying to set the height and width of a div.
> I have included the dimensions.js file as well a jQuery
>
> I can get the height and width - just cannot set it.
>
> Please help.
>
> //Swaps current div with ajax loader div
> function showAjaxLoader(divToReplace){
> var dtr = document.getElementById(divToReplace);
> var w = $(dtr).width();
> var h = $(dtr).height();
> $('div.ajaxLoader').width(w);
> $('div.ajaxLoader').height(h);
> alert(w + ' ' + h);
> }
>
>
> Also tried this:
>
> //Swaps current div with ajax loader div
> function showAjaxLoader(divToReplace){
> var dtr = document.getElementById(divToReplace);
> var w = $(dtr).width();
> var h = $(dtr).height();
> $('div.ajaxLoader').css('width',w);
> $('div.ajaxLoader').css('height',h);
> alert(w + ' ' + h);
> }
>
>



--
Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_____________________________
http://blog.cutterscrossing.com
---------------
The Past is a Memory
The Future a Dream
But Today is a Gift
That's why they call it
The Present

Reply via email to