Oh... I had not seen this jsFiddle before. Well it shows that it should work, in my website it trips up and says that .css is not defined in the scope of __Container but the link you have given me gives me somewhere to go from here in the line of testing;
it may be a scope thing or something. Thank you very much.
UselessChimp
Member
210 Points
110 Posts
Get reference to Jquery selected Object
Dec 29, 2012 11:13 AM|LINK
Hello all,
I am sure this has been discussed elsewhere but I cannot find it in the threads. How do I get an object reference to a JQuery selected item please?
For example I have this:
alert($('.fdFixedContainer').css("max-width"));
which works, but I cannot understand why this does not work:
var __Container = $('.fdFixedContainer');
alert(__Container.css("max-width"));
urenjoy
Star
11997 Points
1797 Posts
Re: Get reference to Jquery selected Object
Dec 29, 2012 11:48 AM|LINK
Both are working fine, check following:
http://jsfiddle.net/b2PtV/
UselessChimp
Member
210 Points
110 Posts
Re: Get reference to Jquery selected Object
Dec 29, 2012 01:49 PM|LINK
Oh... I had not seen this jsFiddle before. Well it shows that it should work, in my website it trips up and says that .css is not defined in the scope of __Container but the link you have given me gives me somewhere to go from here in the line of testing; it may be a scope thing or something. Thank you very much.