Viewing 15 replies - 16 through 30 (of 33 total)
  • Thread Starter Frank1100

    (@frank1100)

    My CSS: (edited)

    h2.trigger a {
    display: block;
    text-decoration: none;
    }

    Thread Starter Frank1100

    (@frank1100)

    when I click the toggle link, it justs jums to the top of the page

    Moderator keesiemeijer

    (@keesiemeijer)

    toggle.js is not loaded. Did you put toggle.js in a directory “js” inside your theme folder?

    Thread Starter Frank1100

    (@frank1100)

    yes, is under wp-content/themes/mystique/js/toggle.js … other .js files are there as well https://img827.imageshack.us/img827/6540/capturehei.png

    Moderator keesiemeijer

    (@keesiemeijer)

    Try changing the code in your theme’s functions.php to:

    function my_scripts_method() {
       // register your script location, dependencies and version
       wp_register_script('toggle_script',
           get_template_directory_uri() . '/js/toggle.js',
           array('jquery'), null);
       // enqueue the script
       wp_enqueue_script('toggle_script');
     }
      add_action('wp_enqueue_scripts', 'my_scripts_method');

    Thread Starter Frank1100

    (@frank1100)

    tx ! … did, but still just jumping to top

    Moderator keesiemeijer

    (@keesiemeijer)

    did, but still just jumping to top

    That’s because toggle.js is still not loaded.

    try:

    – deactivating all plugins to see if this resolves the problem? If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    Thread Starter Frank1100

    (@frank1100)

    all deactivated now, but toggle.js still not loading yet

    Thread Starter Frank1100

    (@frank1100)

    I noticed that the test pages function.php is left open at the end … no closing bracket, seems to be wordpress practice (joomla has it too this way I think) …

    and my final-function.php is closed … maybe the reason for this ?

    Tried to leave the closing bracket away but then I get a page error on this website / but not on the other …

    Moderator keesiemeijer

    (@keesiemeijer)

    I’m stumped, on my testsite this works.

    Are you using a child theme?
    what is the full error when you leave the closing bracket?

    Thread Starter Frank1100

    (@frank1100)

    no child theme, not that I know

    error gives me :

    Parse error: syntax error, unexpected $end in /xxxx/yyyy/zzzz/uptoconcept/current01.uptoconcept.com/wordpress/wp-content/themes/mystique/functions.php on line 228

    Moderator keesiemeijer

    (@keesiemeijer)

    Try putting a closing bracket “}” to the function mystique_remove_old_version_options in your functions.php like this:

    function mystique_remove_old_version_options($old_version){
      if(version_compare($old_version, '3.0', '<')) Atom::app()->reset();
    }

    Thread Starter Frank1100

    (@frank1100)

    I pasted your code at the end before the closing bracket of my function.php but still not working

    Moderator keesiemeijer

    (@keesiemeijer)

    try it with this functions.php: https://bin.cakephp.org/pastes/edit/70434

    Moderator keesiemeijer

    (@keesiemeijer)

    That doesn’t work. try it with this functions.php: https://pastebin.com/qjrrbuzr

Viewing 15 replies - 16 through 30 (of 33 total)
  • The topic ‘WordPress / jQuery’ is closed to new replies.