Side navigation
#13918 closed bug (notabug)
Opened May 22, 2013 05:26AM UTC
Closed May 23, 2013 01:21PM UTC
$().resize() was invalid sometimes
Reported by: | lijianlin16889@163.com | Owned by: | lijianlin16889@163.com |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 2.0.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi, $().resize() methond is invalid sometimes in the 2.0 version but it is always valid if add "onresize" event to body.
Add I cannot give a test because there have many contents.
My code is below:
$(window).resize(function(){ console.log(2222222222222222); ol$.fnReLocateTOMOW("#imgDiv","#preference","#sessionTO"); var adHeight = $(window).innerHeight()-$("#aslTree").offset().top-30, centerH = $("#cmiddle").outerHeight(true), cRealH; if(centerH < adHeight) cRealH = adHeight; $("#aslTree").css({height:adHeight}); console.log($("#aslTree").outerHeight(true)+" === "+adHeight); console.log($("#cmiddle").outerHeight(true)+" === "+adHeight); $("#cmiddle").css({minHeight:cRealH}); });
It will be invalid If I refresh page again after loading completely,
Any error of my code?
Attachments (0)
Change History (4)
Changed May 22, 2013 12:53PM UTC by comment:1
Changed May 22, 2013 01:53PM UTC by comment:2
owner: | → lijianlin16889@163.com |
---|---|
status: | new → pending |
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the "jQuery 1.x (edge)" or "jQuery 2.x (edge)" version to ensure the issue still exists—you may need to change this to a specific version depending on the test case.
For the AJAX-related tests you can create a few fiddles and submit requests to addresses with "/show/light" added to the end of the URL; example: http://jsfiddle.net/m_gol/3hwjC/17/show/light/
To get you started, use the appropriate boilerplate:
- jQuery 1.x http://jsfiddle.net/FrKyN/
- jQuery 2.x http://jsfiddle.net/BenVk/
Open the link and click to "Fork" (in the top menu) to begin.
Also, please read:
- http://blog.jquery.com/2013/04/18/jquery-2-0-released/
- http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/
Additional resources:
- Won't Fix: http://contribute.jquery.org/wont-fix/
- CLA: http://contribute.jquery.org/CLA/
- Style Guide: http://contribute.jquery.org/style-guide/js/
Changed May 23, 2013 04:29AM UTC by comment:3
status: | pending → new |
---|
Hi, I had resolve it! I am sorry It is not a bug. But thanks very much for Getting feedbacks so quick.
I do not find out where I can close this report, So please help me to change its statu.
Thanks again.
Changed May 23, 2013 01:21PM UTC by comment:4
resolution: | → notabug |
---|---|
status: | new → closed |
Because of there are many ajax calls in my code, and includs many dynamic appends, many things are created dynamically.
I do not know why this codes don't works well sometimes, but I tested well use onresize() within dom element.
So, Can anybody give me some directions?
Thanks very much!