Saturday, June 6, 2020

get id of a div using jquery

$("#menu-menu .menu-item").click(function(){

                if($("#236").length == 0) {

               var ids = $(this).attr("id").split("menu-item-");

                var urls = $(this).children("a").attr("href")+"#"+ids[1];

                    window.location=urls;

                return false;

                }

No comments:

Post a Comment