Site icon Hip-Hop Website Design and Development

jQuery perform not working in WordPress however works in jsfiddle

EDIT – That is solved thanks on your assist after the ideas under did not remedy the issue I refreshed my browser cashe and now my features work… Nevertheless I then realized they solely work on the house web page. making a separate thread for that. Thanks for you assist!!!

the brand new thread is right here jQuery features solely work on homepage

I’m making an attempt to make an text-decoration:underline; on energetic perform on a p span “spanish | english” in WordPress. I received it working right here on this jsfiddle https://jsfiddle.web/TonyTheOnly/k92ayp24/

Identical html and css as within the jsfiddle and right here is the jQuery i’m utilizing for WP.

    jQuery(doc).prepared(perform () {
    "use strict";

    jQuery('.toggles span').click on(perform () {

        jQuery(".toggles span").removeClass("energetic");
        jQuery(this).addClass("energetic");
    });
});

Any Assistance is drastically appreciated and thanks on your time.

EDIT

right here is my full features

<?php

perform paramo_script_enqueue() {

    wp_enqueue_style('customstyle', get_template_directory_uri() . '/css/paramo.css', array(), '1.0.0', 'all');
    wp_enqueue_script('customjs', get_template_directory_uri() . '/js/paramo.js', array('jquery'), '1.0.0', true);

}

add_action('wp_enqueue_scripts', 'paramo_script_enqueue');
perform paramo_theme_setup() {

    add_theme_support('menus');

    register_nav_menu('main', 'Major Header Navigation');
    register_nav_menu('secondary', 'Footer Navigation');   
}

add_action('init', 'paramo_theme_setup');
add_theme_support('custom-header');


perform enqueue_our_required_stylesheets(){
    wp_enqueue_style('font-awesome', get_stylesheet_directory_uri() . '/css/font-awesome.css'); 
}
add_action('wp_enqueue_scripts','enqueue_our_required_stylesheets');

Full.js file

/*international $, jQuery, alert*/

jQuery.noConflict();

jQuery(doc).prepared(perform () {
    "use strict";

    jQuery(".burger-nav").on("click on", perform () {

        jQuery("nav ul").toggleClass("open");
    });


    jQuery(".spanish").on("click on", perform () {
        jQuery(".englishNav").cover();
        jQuery(".spanishNav").present();
    });

    jQuery(".english").on("click on", perform () {
        jQuery(".englishNav").present();
        jQuery(".spanishNav").cover();
    });

    jQuery('.toggles span').click on(perform () {

        jQuery(".toggles span").removeClass("energetic");
        jQuery(this).addClass("energetic");
    });

});

full header

<!doctype html>
<html>
    <head>
         <meta charset="UTF-8">
    <meta http-equiv="X-UA-Appropriate" content material="IE=edge">
    <meta title="viewport" content material="width=device-width, initial-scale=1">
        <title>Paramo Galeria</title>
        <?php wp_head(); ?>

    </head>

    <physique <?php body_class( $awesome_classes ); ?>>
        <part>
        <div class="topBar">
            <img src="<?php header_image();?>" peak="120px;" width="100px;" alt=""/ class="siteLogo">
        <div class="topBarMiddle">
            <p class="toggles"><span class="spanish">español</span> | <span class="english">english</span></p>
          <div class="topBarRight">  
            <nav>
            <a category="burger-nav"></a>
                <ul class="englishNav">
                    <li><a href="http://localhost:8888/ParamoGaleria/dwelling">Residence</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/artists">Artists</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/exhibitions">Exhibitions</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/offsite">Offsite</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/store">Store</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/contact"> Contact</a></li>
                    <li model="padding-top:50px;"><i class="fa fa-facebook fa-1.5x" model="padding-right:10px;"></i><i class="fa fa-instagram fa-1.5x" model="padding-right:10px;"></i><i class="fa fa-twitter fa-1.5x"></i></li>
                </ul>
                <ul class="spanishNav">
                    <li><a href="http://localhost:8888/ParamoGaleria/dwelling">Residence</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/artists">Artistsio</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/exhibitions">Exhibitions</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/offsite">Offsite</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/store">Store</a></li>
                    <li><a href="http://localhost:8888/ParamoGaleria/contact"> Contact</a></li>
                    <li model="padding-top:50px;"><i class="fa fa-facebook fa-1.5x" model="padding-right:10px;"></i><i class="fa fa-instagram fa-1.5x" model="padding-right:10px;"></i><i class="fa fa-twitter fa-1.5x"></i></li>
                </ul>
            </nav>
          </div>
        </div>
        </part>

index

<?php get_header(); ?>

    <?php 

    if( have_posts() ):

        whereas( have_posts() ): the_post(); ?>


            <p><?php the_content(); ?></p>



        <?php endwhile;

    endif;

    ?>

<?php get_footer(); ?>