Middle way down on jQuery UI’s demo web page here what is the source code for the “View Source” link that opens and close a window of the source code?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is just a function in their script that hides and shows the source div:
You can view the full script here, it grabs the code via ajax (
$.get()of the current page, or when you click a demo link on the right, grabs that one), formats it for display, then passes it into that function to insert a “view source” div/link at the right place in the page.