Grigory Volochy on "Detect hover over control label in customizer"

ساخت وبلاگ

And, actually, element with "site-title" CSS class at "theme shown in customizer preview" is located within <iframe>. So, if your script can see it, it means that script is loaded withing that <iframe>, so it can't see anything outside it - that "#customize-control-blogname" is located without that <iframe>.

In this case, probably you need to try:

function include_my_unique_script(){ wp_enqueue_script('my-unique-script', get_template_directory_uri() . '/my-unique-script.js');
}
add_action('customize_controls_enqueue_scripts', 'include_my_unique_script');

to inqueue your file with JavaScript that should to bind "hover" event to that element.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 335 تاريخ : چهارشنبه 15 ارديبهشت 1395 ساعت: 4:58