Title: Proper formating for Javascript function?
Last modified: August 19, 2016

---

# Proper formating for Javascript function?

 *  [macart](https://wordpress.org/support/users/macart/)
 * (@macart)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/proper-formating-for-javascript-function/)
 * Hi Noob here,
 * Can someone please tell me how to properly format this javascript function to
   include in my functions.php file?
 *     ```
       $(function() {
       	$(".jqzoom").jqzoom();
       });
       ```
   
 * Thank you

Viewing 3 replies - 16 through 18 (of 18 total)

[←](https://wordpress.org/support/topic/proper-formating-for-javascript-function/?output_format=md)
[1](https://wordpress.org/support/topic/proper-formating-for-javascript-function/?output_format=md)
2

 *  Thread Starter [macart](https://wordpress.org/support/users/macart/)
 * (@macart)
 * [16 years, 4 months ago](https://wordpress.org/support/topic/proper-formating-for-javascript-function/page/2/#post-1332648)
 * Thanks for that. Still no hover effect.
    Is there some reason that JQZOOM doesnt
   work with wordpress? Anyone get this to work in WordPress?
 * Thanks
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [16 years, 4 months ago](https://wordpress.org/support/topic/proper-formating-for-javascript-function/page/2/#post-1332649)
 * And macart, we can’t debug magic code without seeing the actual site. Show us
   what’s broken. Give us a URL. Then somebody might be able to actually help you.
 *  [evdboogaard](https://wordpress.org/support/users/evdboogaard/)
 * (@evdboogaard)
 * [16 years, 3 months ago](https://wordpress.org/support/topic/proper-formating-for-javascript-function/page/2/#post-1332672)
 * Thanks Otto42!
 * Macart, I have it working with WordPress MU 2.9
    thanks to Otto42’s suggestion:
 *     ```
       jQuery(document).ready(function($) {
           // $() will work as an alias for jQuery() inside of this function
   
           $(function() {
       	$(".jqzoom").jqzoom();
           });
   
       });
       ```
   
 * I suggest you check your paths too, make sure everything is loaded correctly.

Viewing 3 replies - 16 through 18 (of 18 total)

[←](https://wordpress.org/support/topic/proper-formating-for-javascript-function/?output_format=md)
[1](https://wordpress.org/support/topic/proper-formating-for-javascript-function/?output_format=md)
2

The topic ‘Proper formating for Javascript function?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 18 replies
 * 5 participants
 * Last reply from: [evdboogaard](https://wordpress.org/support/users/evdboogaard/)
 * Last activity: [16 years, 3 months ago](https://wordpress.org/support/topic/proper-formating-for-javascript-function/page/2/#post-1332672)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
