add.js
jQuery(document).ready(function(){
jQuery(".togglebutton button").click(function(){
jQuery("#nav-primary ul.menu").slideToggle();
jQuery(this).toggleClass('btn-open').toggleClass('btn-close');
//$( "#nav-primary ul" ).toggle( "slide" ); -Left to right slide-
//$( "#nav-primary ul" ).toggle('slide', { direction: 'right'}); -right to Left slide-
});
});
jQuery(document).ready(function(){
jQuery('.post_img>a[href=""]>.soo_icon').css("display", "none");
jQuery('.field-name-field-gallery-images>.field-items').addClass('row');
jQuery( ".field-name-field-gallery-images>.field-items.row>.field-item.even").wrap( "
jQuery( ".field-name-field-gallery-images>.field-items.row>.field-item.odd").wrap( "
jQuery('.expanded>a').addClass('in_year');
jQuery('.expanded>.menu').addClass('month_list');
jQuery(".in_year").after("");
jQuery("#block-menu-block-1>.active-trail").parent("ul").css("display", "block");
jQuery(".toggle_active").parent("li").addClass("bckground");
jQuery(".expanded>.menu").css({'display':'none'});
jQuery('ul.month_list>li>a.active-trail.active').parent().parent().css("display", "block");
jQuery('ul.month_list>li>a.active-trail.active').parent().parent().prev("span").addClass("toggle_active");
jQuery(".faqtoggle").click(function(){
jQuery(this).next('.menu').slideToggle();
jQuery(this).toggleClass('toggle_active');
jQuery(this).parent().toggleClass('bckground');
});
jQuery("#mmenu_right").mmenu();
var api = jQuery('#mmenu_right').data('mmenu');
jQuery('#close-mmenu').click(function() {
api.close();
});
var copyData = jQuery('.staf_de #block-block-10 .content').html();
var CopyDataFinal = '' + copyData+ '';
jQuery(".view-person-view .views-row-last" ).after( CopyDataFinal );
var readmore = jQuery('.region-preface-first').html();
var readmorelesstext = readmore.substr(0,500);
var query_media = window.matchMedia('(max-width: 767px)').matches;
var last_text = readmore.length > 500;
if(last_text && query_media ){
jQuery('.region-preface-first').html(readmorelesstext).append("Continue Reading");
}
else{
jQuery('.region-preface-first').html(readmore);
}
jQuery("body").on("click",".preface_text",function(){
jQuery(this).parent(".region-preface-first").html(readmore);
});
});
Add the read more button
jQuery(".page-passive-house").find('#content_top').html();
var readmore = jQuery(".page-passive-house").find('#content_top').html();
var readmorelesstext = readmore.substr(0,1000);
var last_text = readmore.length > 1000;
if(last_text){
jQuery('.page-passive-house').find('#content_top').html(readmorelesstext).append("<a href='#' class='preface_text'>Continue Reading</a>");
}
else{
jQuery('.page-passive-house').find('#content_top').html(readmore);
}
jQuery("body").on("click",".preface_text",function(){
jQuery(this).parent("#content_top").html(readmore);
});
No comments:
Post a Comment
If you have any problem please let me know.