Skip to content

Instantly share code, notes, and snippets.

View HarishChaudhari's full-sized avatar

Harish Chaudhari HarishChaudhari

  • Bitwise Global
  • Pune
View GitHub Profile
@MarcosNASA
MarcosNASA / ChatGPTVoice.js
Last active December 6, 2022 17:15
Gives ChatGPT a voice
const debounce = (delay) => (fn) => {
let timeoutId;
return (...args) => {
clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
fn(...args);
}, delay);
};
};
const speak = (text) => {
/* select element styling */
jQuery('.rtp-select').each( function() {
var self = jQuery(this),
title = self.attr('title');
if( jQuery('option:selected', this).val() !== '' ) title = jQuery('option:selected', this).text();
self
.css({
'z-index': 10,
'opacity': 0,
@sagarjadhav
sagarjadhav / equal-height.js
Created September 24, 2013 12:01
jQuery Equal Height Elements
/* Equal Height */
jQuery('.elemWrapper').each(function(){
var max = Math.max.apply(Math, jQuery(this).find('.elem').map(function() { return jQuery(this).height(); }));
jQuery(this).addClass('fixed-height').find('.elem').height(max);
});
@sagarjadhav
sagarjadhav / smooth-scroll.js
Created September 13, 2013 06:14
jQuery smooth scroll animation
/* Smooth Scroll */
jQuery('.rtp-back-to-top').click( function() {
jQuery('html, body').animate({
scrollTop: jQuery( jQuery(this).attr('href') ).offset().top
}, 1000);
return false;
});