Advice and Examples: Using jQuery, if you wanted to make a div move along the screen, what function would you most likely use? For a Web Developer Interview Question.
1. Using jQuery, if you wanted to make a div move along the screen, what function would you most likely use?
How to Answer
This is another specific technical question. As was mentioned earlier, the majority of your interview will involve specific technical questions. Researching the company, its products, and the technology that it uses is the best way to be prepared to answer these types of questions. It will also help you frame your answers to address the technical and business issues the company is hiring you to help them resolve.
1st Answer Example
"The easiest way to make a div move along the screen is to use the jQuery animate feature. The standard way of doing this is to position the element as absolute and then animate it left or right. You can also accomplish those by increasing or decreasing either the left or right margin."
"A div element can be made to move along the screen in several ways. The easiest of these is first to position the element absolutely and then animate the left or right CSS property of the element. Another workaround to this is to increase or decrease the margins of the page in which the element is displayed. When doing this, you can anticipate a drop in the performance of the web page with the animation lasts more than a few seconds."