themeply
Forum Replies Created
-
Forum: Hacks
In reply to: Detect hover over control label in customizerOne more thing.. I want to interact with the elements in the site preview iframe.
If I add the following line to hide the #site-title element, nothing happens:
$(“#site-title”).hide();
jQuery(document).ready(function($){ setTimeout(function() { $($("#customize-control-blogname")).hover(function(){ alert("hover!"); $("#site-title").hide(); }, function (){ alert("unhover!"); }); }, 3000); });I’m guessing it’s beyond the scope of the customizer section?
Forum: Hacks
In reply to: Detect hover over control label in customizerThe last code block worked for me. Thank you so much Grigory!
Forum: Hacks
In reply to: Detect hover over control label in customizerFull code of my-unique-script.js:
jQuery(document).ready(function($){ var element = $("#customize-control-blogname"); alert(typeof(element)); $("#customize-control-blogname").hover(function(){ alert("hover!"); }); });Forum: Hacks
In reply to: Detect hover over control label in customizerThank you again for your response Grigory.
When I add the code:
`
jQuery(document).ready(function($){
var element = $(“#customize-control-blogname”);
alert(typeof(element));
});’It alerts ‘object’, so I guess that’s what it should be showing.
I still can’t get the alert to fire when I mouse/hover over the ‘Site Title’ list item as seen in customizer http://i.imgur.com/8kfGb1u.png
Forum: Hacks
In reply to: Detect hover over control label in customizerThanks for your reply Grigory.
I’m still not able to get the alert to fire when hovering over li#customize-control-blogname
I’m sure the JS is loading because if I change the element selector to #site-title (which I have in the header of theme shown in customizer preview) the alert shows. Any other idea? Thank you very much.