Category Archives: PHP and jQuery Interview Questions

How can you select all elements in a page using jQuery? | PHP and jQuery Questions

To select all elements in a page, we can use all selectors, for that we need to use *(asterisk symbol). <script language=”javascript” type=”text/javascript”> $(“*”).css(“border”, “2px dotted red”); </script>

Posted in PHP and jQuery Interview Questions | Leave a comment

What are the different type of selectors in Jquery? | PHP and jQuery Questions

There are 3 types of selectors in Jquery: 1. CSS Selector 2. XPath Selector 3. Custom Selector

Posted in PHP and jQuery Interview Questions | Leave a comment

Name some of the methods of JQuery used to provide effects? | PHP and jQuery Questions

Some of the common methods are : 1. Show() 2. Hide() 3. Toggle() 4. FadeIn() 5. FadeOut()

Posted in PHP and jQuery Interview Questions | Leave a comment

What is JQuery UI? | PHP and jQuery Questions

JQuery UI is a library which is built on top of JQuery library. JQuery UI comes with cool widgets, effects and interaction mechanism.

Posted in PHP and jQuery Interview Questions | Leave a comment

How is body onload() function is different from document.ready() function used in jQuery? | PHP and jQuery Questions

Document.ready() function is different from body onload() function because off 2 reasons: 1. We can have more than one document.ready() function in a page where we can have only one onload function. 2. Document.ready() function is called as soon as … Continue reading

Posted in PHP and jQuery Interview Questions | Leave a comment

What does dollar Sign ($) means in JQuery? | PHP and jQuery Questions

Dollar Sign is nothing but it’s an alias for JQuery: Take a look at below jQuery code $(document).ready(function() { } ); Over here $ sign can be replaced with “jQuery ” keyword. jQuery(document).ready(function(){ });

Posted in PHP and jQuery Interview Questions | Leave a comment

What difference between require() and require_once(). | PHP and jQuery Questions

Require() The Require() is used to include a file, It create fatal error if file not found and terminate script. require_once() The require_once() to require() except PHP will check if the file has already been included, and if so, tricor … Continue reading

Posted in PHP and jQuery Interview Questions | Leave a comment

How can I execute a PHP script using command line? | PHP and jQuery Questions

Just run the PHP CLI (Command Line Interface) program and provide the PHP script file name as the command line argument. For example, “php myScript.php”, assuming “php” is the command to invoke the CLI program. Be aware that if your … Continue reading

Posted in PHP and jQuery Interview Questions | Leave a comment

Return ASCII value of character in php? | PHP and jQuery Questions

using ord() method we can get ASCII value of character in php. <?php $str = “\n” style=”color: #007700;”>; if (ord style=”color: #0000bb;”>$str) == 10) { echo “The first character of \$str is a line feed.\n”; } ?>

Posted in PHP and jQuery Interview Questions | Leave a comment

How can we Calculate the similarity between two strings. | PHP and jQuery Questions

Using similar_text() get similarity between two strings. Return Values Returns the number of matching chars in both strings. example: <?php $first =’php3′; $first =’php4′; echo retail price similar_text ( $first, $second ) //3 ?>

Posted in PHP and jQuery Interview Questions | Leave a comment