WordPress.org

Ready to get started?Download WordPress

Forums

Sampression Lite
[resolved] How to achieve radio button behaviour (3 posts)

  1. Sampression
    Member
    Theme Author

    Posted 1 year ago #

    Here's a small tip for implementing radio button behaviour on "Sampression Lite" theme.
    Go to script.js on \wp-content\themes\sampression-lite\lib\js and add a line after line 121.

    jQuery('.nav-listing li a').removeClass('selected');
    /*-    This did it!(radio button like)!           */

    All credit goes to John A. Grindle

  2. Sampression
    Member
    Theme Author

    Posted 1 year ago #

    Here's a small tip for implementing radio button behaviour on "Sampression Lite" theme.
    Go to script.js on \wp-content\themes\sampression-lite\lib\js and add a line after line 121.

    jQuery('.nav-listing li a').removeClass('selected');
    /*-    This did it!(radio button like)!           */

    All credit goes to John A. Grindle

  3. brucedoscher
    Member
    Posted 1 year ago #

    Hi, Thank you for a great theme. Getting the navigation to work like radio buttons is exactly what I was looking to modify, however this bit of code doesn't seem to change anything for me. Do I have it in the correct place? Are there any other parts of the code I need to modify? Thanks in advance.

    if(elm.children('ul').length>0){
    
     jQuery('.nav-listing li a').removeClass('selected');
    /*-    This did it!(radio button like)!           */
    
    parentelem.after(jQuery("<option />", {
        "class" : "level-menu-"+level,
        "value"   : anchor.attr("href"),
        "text"    : dash+anchor.text()

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.