Skip to main content

Bug Tracker

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 lijianlin16889@gmail.com comment:1

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!

Changed May 22, 2013 01:53PM UTC by m_gol comment:2

owner: → lijianlin16889@163.com
status: newpending

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:

Open the link and click to "Fork" (in the top menu) to begin.

Also, please read:

Additional resources:

Changed May 23, 2013 04:29AM UTC by lijianlin16889@163.com comment:3

status: pendingnew

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 dmethvin comment:4

resolution: → notabug
status: newclosed