You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
1.9 KiB
JavaScript

$(document).ready(function() {
4 years ago
/* frequent words */
$('.chosen_words').click( function(){
var word = $(this).text();
alert(word);
});
$('.t_chosen_words').click( function(){
var word = $(this).text();
alert(word);
});
4 years ago
/* legend */
4 years ago
$(document).ready(function(){
$(".legendverb").mouseover(function(){
$(".legendverb").css("background-color", "yellow");
});
$(".legendverb").mouseout(function(){
$(".legendverb").css("background-color", "white");
});
});
4 years ago
4 years ago
$(".legendverb").click(
$('.VB, .VBZ, .VBN, .VVD, .legendverb').css('background-color', isButtonBlue ? 'red' : 'blue');
isButtonBlue = !isButtonBlue;
4 years ago
});
4 years ago
4 years ago
/* pos highlight*/
4 years ago
$('.TO, .DT, .IN, .WDT, .WP, .MD, .PRP, .CC, .VBP, .WRB, .marks, .comma, .dot').click(
function() {
4 years ago
$('.TO, .DT, .IN, .WDT, .WP, .MD, .PRP, .CC, .VBP, .WRB, .marks, .comma, .dot').toggleClass('hide');
});
$('.JJ').click(
function() {
$('.JJ').toggleClass('adjective');
});
4 years ago
$('.PRPS').click(
function() {
$('.PRPS').toggleClass('possesivepronoun');
});
$('.VBG').click(
function() {
$('.VBG').toggleClass('presentparticiple');
});
$('.JJS').click(
function() {
$('.JJS').toggleClass('Adjectivesuperlative');
});
$('.NN, .NNS').click(
function() {
$('.NN, .NNS').toggleClass('noun');
});
$('.VB, .VBZ, .VBN, .VVD').click(
function() {
$('.VB, .VBZ, .VBN, .VVD').toggleClass('verb');
});
$('.NNP, .NNPS').click(
function() {
$('.NNP, .NNPS').toggleClass('propernoun');
});
$('.RB').click(
function() {
$('.RB').toggleClass('adverb');
});
$('.RBR, .JJR').click(
function() {
$('.RBR, .JJR').toggleClass('adverb-comparative');
});
$('.RBS').click(
function() {
$('.RBS').toggleClass('adverb-superlative');
});
4 years ago
/* Image cick to make bigger */
$('.image').click(
function() {
$(this).toggleClass('img_clicked');
});
$('.t_image').click(
function() {
$(this).toggleClass('t_img_clicked');
})
})