Try moving the function declaration to the $(document).ready() callback.If that doesn't work, can you post a link to a page where I can see this in action?

chris_upjohn
—
2013-09-23T09:07:09Z —
#3

What you're trying to accomplish isn't possible with the above as events can't return values to a variable directly, instead what you should be doing is using the reloadSlider method that bxSlider has built into it that allows for real time updates. See the following for an example.

Is there any way without refreshing the page? It should automatically remove those slide one by one when I gradually minimize the browser?It's currently doing is, it gradually decrease the size of the image not remove them one by one according to if and else condition.

Thanks in advance for the input

chris_upjohn
—
2013-09-23T11:56:45Z —
#10

If you need something dynamic Pullo's approach can be converted to something like the following.

Just reading back through the thread - is there anything else you need a hand with, or are we good?

solidcodes
—
2013-09-23T12:47:17Z —
#15

@Pullo ;Okay I'll change my comments above.It should auto refresh the page when if and else condition is meet,and when a user gradually minimize the page.So the user don't need to press 'f5' on his keyboard.

Thanks in advance.

solidcodes
—
2013-09-23T17:52:06Z —
#16

Thanks guys, I'll use index4.htm

Pullo
—
2013-09-23T18:34:19Z —
#17

Hi Warren,

I was working on this when I saw you had replied that you will use a different version of your code.

So far I have managed to make a demo which works as you want with one slider.It seems that adding a throttle to the resize event helped.

I don't know how difficult this would be to apply to multiple sliders.