Twitter Bootstrap Bio popovers
-
Hey.
Firstly thanks nice plugin.
I am some way through attempting to get a staff bio to popover using twitter BS jquery popovers. I have been messing around with line 85 of user-view-show-staff-list.php
Have also added a line ‘$output .= ‘ to call the script.
cant seem to get it working though..
if ($i % 2) { $output .= '<div style="background-color: transparent!important;" rel="popover" data-content"'.$bio.'" data-original-title="" data-toggle="tooltip" data-placement="top" name="'.$name_slug.'" id="'.$name_slug.'" class="staff-member odd '.$staff_member_classes.'">'; } else { $output .= '<div style="background-color: transparent!important;" rel="popover" data-content"'.$bio.'" data-original-title="" data-toggle="tooltip" data-placement="top" name="'.$name_slug.'" id="'.$name_slug.'" class="staff-member even '.$staff_member_classes.'">'; } if(has_post_thumbnail()){ $photo_url = wp_get_attachment_url( get_post_thumbnail_id() ); $photo = '<img class="staff-member-photo" src="'.$photo_url.'" alt = "'.$title.'">'; }else{ $photo_url = ''; $photo = ''; } if (function_exists('wpautop')){ $bio_format = '<div class="staff-member-bio">'.wpautop($bio).'</div>'; } $email_mailto = '<a class="staff-member-email" href="mailto:'.antispambot( $email ).'" title="Email '.$name.'">'.antispambot( $email ).'</a>'; $email_nolink = antispambot( $email ); $accepted_single_tags = $default_tags; $replace_single_values = array($name, $name_slug, $photo_url, $title, $email_nolink, $phone, $bio, $fb_url, $tw_url); $accepted_formatted_tags = $default_formatted_tags; $replace_formatted_values = array('<h3 class="staff-member-name">'.$name.'</h3>', '<h4 class="staff-member-position">'.$title.'</h4>', $photo, $email_mailto, $bio_format ); $loop_markup = str_replace($accepted_single_tags, $replace_single_values, $loop_markup); $loop_markup = str_replace($accepted_formatted_tags, $replace_formatted_values, $loop_markup); $output .= $loop_markup; $loop_markup = $loop_markup_reset; $output .= '<script>jQuery(".staff-member").mouseenter(function(){ jQuery(".staff-member").popover().popover("show");});</script>'; $output .= '</div> <!-- Close staff-member -->'; $i += 1;
Thanks in advance for any help
- The topic ‘Twitter Bootstrap Bio popovers’ is closed to new replies.