http://api.jquery.com/jQuery.getJSON/

http://www.w3schools.com/jquery/ajax_getjson.asp

http://api.jquery.com/jQuery.parseJSON/

http://www.json.org/js.html

http://php.net/manual/en/function.json-encode.php

http://techblog.willshouse.com/2009/06/12/using-json_encode-and-json_decode-in-php4/

Individuals would be the sites I have been researching probably the most attempting to wrap my mind around json

This really is my php

$fvsc=array();
query_posts('meta_key=featuredv');  
if (have_posts()) :  
    while (have_posts()) : 
        the_post();
        $fvsc []= "\n" . '<div id="featuredv-' . "$wp_query->current_post\">" . "$post->post_content;" . '</div>';
    endwhile;  
endif;
$jsonObject= json_encode($fvsc);   

which is my .js

jQuery(document).ready(function($){
    jQuery.getJSON("<?php TEMPLATEPATH . '/featuredv.php'?>",function(data){
        var fvsJA=jQuery.parseJSON(<?php $jsonObject; ?>);
        var fts = $("#ttContent>[id^=featuredt]");  
        var fvs = $("#inCenter>[id^=featuredv]");
    });
    fts.click( function(){   
        $("#inCenter>[id^=featuredv]").replaceWith( function(){
            $(fvsJA).eq(fts.index(this))
        });
    });

What I am attempting to do is make my $fvsc array right into a jQuery array. $fvsc is a range of videos, whenever a fts is clicked on it will go ahead and take items in a div and change it with another video which has exactly the same index as whichever fts was clicked on. Should you just load all of the fts and fvs into one place you should use the press function here and delay pills work great but when you echo out 5 videos after which later 10 and so forth the website loads even worse. I figured basically could convert my php array right into a jquery object that loads json strings after that time click converts back to an item and replaces the div contents the burden would degrade better.

I see several issues inside your code:

  1. $fvsc []= "\n" . '<div id="featuredv-' . "$wp_query->current_post\">" . "$post->post_content;" . '</div>';

    I do not think you are able to wrap class's variable in double quote. It ought to be something similar to this:

    $fvsc []= '<div id="featuredv-' . $wp_query->current_post . '">' . $post->post_content . '</div>';
    
  2. There's problem inside your JS, particularly, how you access URL. The thing is, ajax in wordpress is a little diverse from the standard php. Take a look here to learn more: http://wordpress.stackexchange.com/questions/9231/whats-the-preferred-method-of-writing-ajax-enabled-plugins/9236#9236