Title: $().ready(function() not working
Last modified: August 19, 2016

---

# $().ready(function() not working

 *  Resolved [danstech](https://wordpress.org/support/users/danstech/)
 * (@danstech)
 * [16 years ago](https://wordpress.org/support/topic/readyfunction-not-working/)
 * I am working on a coda slider plugin for my site, but the $().ready(function()
   won’t work in Firefox. Evey other browser I have tried (chrome, safari, opera,
   IE) works fine. Here is where I call the function from a shortcode. The site 
   is [http://beta.danstechstop.com](http://beta.danstechstop.com)
 *     ```
       function shortcode( $atts, $content = null ) {
       		extract( shortcode_atts( array(
       			'query' => null,
       			'id' => null,
       			'args' => null
       		), $atts ) );
   
       		//Make sure there is a query and name
       		if (! $query || ! $id)
       			return 'Could not load slider. Mallformed shortcode.';
   
       		$add_my_script = true;
   
       		$o = '
       		<div class="coda-slider-wrapper">
       			<div class="coda-slider preload" id="'. $id .'">';
   
       		$posts = get_posts($query . 'numberposts=-1');
       		foreach($posts as $post){
   
       			$o.=
       			'<div class="panel" id="post-' . $post->ID . '">
       				<div class="panel-wrapper">
       					<h2 class="title">' . $post->post_title . '</h2>
       					' . $post->post_content . '
       				</div> <!-- .panel-wrapper -->
       			</div><!-- .panel #post-$id -->';
       		}
   
       		$o.='
       				</div><!-- .coda-slider .preload -->
       			</div><!-- coda-slider-wrapper -->
       			<script type="text/javascript">
       				$().ready(function() {
       					$('. $id .').codaSlider({' . $args .'});
       				});
       			</script>';
   
       		return $o;
       	}
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [danstech](https://wordpress.org/support/users/danstech/)
 * (@danstech)
 * [16 years ago](https://wordpress.org/support/topic/readyfunction-not-working/#post-1513499)
 * I found my problem… I needed coffee! I missed the # in the function…
 *     ```
       $o.='
       				</div><!-- .coda-slider .preload -->
       			</div><!-- coda-slider-wrapper -->
       			<script type="text/javascript">
       				$().ready(function() {
       					$(\'#'. $id .'\').codaSlider({' . $args .'});
       				});
       			</script>';
       ```
   
 *  [LeftClick](https://wordpress.org/support/users/leftclick/)
 * (@leftclick)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/readyfunction-not-working/#post-1513745)
 * Hi
 * Great plugin. I am currently using Coda Slider on my website but I have been 
   encountering a conflict problem.
 * The coda slider works perfectly but plugins within the posts aren’t working. 
   The only thing it displays is the shortcode.
 * Any ideas?
 * Thanks
    Laura

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘$().ready(function() not working’ is closed to new replies.

## Tags

 * [coda slider](https://wordpress.org/support/topic-tag/coda-slider/)
 * [Firefox](https://wordpress.org/support/topic-tag/firefox/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 2 replies
 * 2 participants
 * Last reply from: [LeftClick](https://wordpress.org/support/users/leftclick/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/readyfunction-not-working/#post-1513745)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
