I'm creating a clickable <DIV> that calls the "resizeVideo" function.
- jQuery("<DIV>").attr("id", "video1FullSize").click(resizeVideo);
This works great, and clicking the button repeatedly calls resizeVideo. resizeVideo looks at the ID of the item that called it (video1FullSize) to determine which video should be resized (video1).
Now, I want to add some logic to also call this event when the window is resized. Before getting too involved in the issues surrounding how often the resize event is called on a window, I'm trying to simply "click" #video1FullSize to simulate the event.
- jQuery("#video1FullSize").click();
- jQuery("#video1FullSize").trigger("click");
I cannot get either to work.
This seems simple, and I feel like I've done this exactly before.
I'm stuck on jQuery 1.3.2 for this project. Any tips or advice would be greatly appreciated!
Best,
Nate