I’m making a site in two language ,I want to give a “jquery Modal Window” before English page load to give a option to choose another language link (on a modal window).If user will click on Second language link he will go for that page and if he want to stay with english he just needed to close the window.
Share
If you want the user to pick a language before using a site, and your current plan is to present them with a “modal” jquery dialog…then a more usable, user-friendly approach would be to create a language-selection landing page that users will be presented upon entering your site. A landing page like this, for all intents and purposes…is modal, but its much more accessible to your users. If any of them have javascript disabled for any reason, or are using a browser, cough IE cough, that doesn’t render dhtml-based “modal” stuff very well, then at least your users arn’t presented with anything quirky that may make it difficult or impossible for them to actually choose their language of choice.
That said, if you want a script to run at a specific point during your page load…just place the script directly inside the <script> tags, without any function or other wraper around it. Browsers will execute inline script as soon as that script block is loaded, even if the document is not yet “ready”.