From 54aefd757427b7eb07f30d241a6e9d5d1cd2afbd Mon Sep 17 00:00:00 2001 From: Priyanka Bhagwat Date: Tue, 26 Aug 2014 16:18:51 +0530 Subject: added time span in testimonial --- js/script.js | 18 ++++++++++++++++++ js/testimonials_script.js | 4 ++-- templates/page-front.tpl.php | 24 +++++++++++++++++++++--- 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 js/script.js diff --git a/js/script.js b/js/script.js new file mode 100644 index 0000000..fcb6a04 --- /dev/null +++ b/js/script.js @@ -0,0 +1,18 @@ +$("#txtSearchPage").keyup(function() { + var search = $(this).val(); + $(".time-entry").show(); + if (search) + $(".time-entry").not(":containsNoCase(" + search + ")").hide(); +}); + +$.expr[":"].containsNoCase = function (el, i, m) { + var search = m[3]; + if (!search) return false; + return new RegExp(search,"i").test($(el).text()); +}; + + +// jQuery Plug-in example +$("#txtSearchPagePlugin") + .searchFilter({targetSelector: ".time-entry"}) + diff --git a/js/testimonials_script.js b/js/testimonials_script.js index ee425c5..0ab8a57 100755 --- a/js/testimonials_script.js +++ b/js/testimonials_script.js @@ -5,7 +5,7 @@ $(document).ready(function(){ (function showNextTestimonial(){ - $('#testimonials_front li:visible').delay(8000).fadeOut('slow',function(){ + $('#testimonials_front li:visible').delay(12000).fadeOut('slow',function(){ $(this).appendTo('#testimonials_front ul'); if($(this).next().length > 0) { @@ -22,4 +22,4 @@ $(document).ready(function(){ }); })(); -}); \ No newline at end of file +}); diff --git a/templates/page-front.tpl.php b/templates/page-front.tpl.php index e2488c7..01e1cd6 100755 --- a/templates/page-front.tpl.php +++ b/templates/page-front.tpl.php @@ -389,12 +389,28 @@ if($length>260) { $cut1= drupal_substr($string, 0, 260); - $cut=$cut1."..."; + $cut=$cut1." ... "; + echo "
{$cut}Read more
+{$row->body}
{$row->name},
+{$row->department}, + {$row->university},
+{$row->contribution},{$row->reference}.
+{$row->name},{$row->university}, + {$row->contribution},
+{$row->reference}.
+{$cut}Read more
+ echo "{$cut}
{$row->body}