[Plugin: Front-end Editor] Use With jQuery
-
Fantastic plugin, but I am trying to implement it with a jQuery plugin and was hoping for some direction.
In the code example below, the ‘searchLinks’ option in bolded text (wpmu) affects the output of a Twitter stream based on the pre-defined search term ‘wordpress’. By clicking that link, the Twitter stream will change from all posts with ‘wordpress’ to ‘wpmu’. This text is visible within the custom page template I’m using, but I can’t figure out if it’s possible to make this an editable item using Front End Editor. Assistance greatly appreciated!
<div id=”twitterSearch” class=”tweets”></div>
<p id=”searchLinks”>Change to: wpmu.</p><div id=”twitterUserTimeline” class=”tweets”></div>
<script type=”text/javascript”>
// Basic usage
$(‘#twitterSearch’).liveTwitter(‘wordpress‘, {limit: 5, rate: 5000});// Changing the query
$(‘#searchLinks a’).each(function(){
var query = $(this).text();
$(this).click(function(){
// Update the search
$(‘#twitterSearch’).liveTwitter(query);
// Update the header
$(‘#searchTerm’).text(query);
return false;
});
});</script>
- The topic ‘[Plugin: Front-end Editor] Use With jQuery’ is closed to new replies.