Second list update based on first list change in Wp customizer

I have two options list First one is for font second list for font weights.I want to run below php code each time when user change font.So second list update based on first list change.

$blog_font = get_theme_mod( 'body_google_fonts' );

I am guessing this will be done using ajax.I have little knowledge about ajax but i tried to implement whole night but its not working.Please help.

Source: wordpress

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.