Hi, i'm having an issue with setting the width of a field using $ ('#field_id').width(). My setup is as follows:
- I have a form with multiple divs, on load I run some code to turn these divs into tabbed content i.e. only one div showing at any point. When "&tab=x" appears in the URL, my code opens that tab instead of the default 1st tab - There is a field on the first (and default) tab which I'm a) reducing the width of and b) placing an image next to using the following: $('#field_id').width($('#field_id').width() - 25)).after ('img_html') - I then add a click event handler to the newly inserted image using $ ('#img_id').click(function(){js_to_run}); This works completely as expected when the form opens to the default tab. My problem is that when I open the form to a different tab (e.g. using &tab=3 in the URL), the width of the field is not being updated. The image is still inserted and the image click is still handled. It appears that the only thing not being updated is the field width. Has anyone come across this before or have any ideas if (and where) I'm going wrong? Cheers, Lee