Creating a selector for a shortcode button without activating click event

This topic contains 8 replies, has 2 voices, and was last updated by  bluedognz 5 years, 3 months ago.

Author Posts

bluedognz

Hi

On this page I have an enroll now button, just under the H1.

https://courses.bluedogwebsites.com/

How do I create a selector so I can style it? When attempting to target the button I click on it and it “enrolls me” (which makes the button disapear). I hope that makes sense. Apologies, I think I’m missing something really basic.

Thanks!
Clark


Sebastian

Hey Clark,

Are you double-clicking on the ‘Enroll me’ button? Or clicking the Target button at the top left first and then single-clicking on it? If it’s the former, MT shouldn’t follow links if you double-click them fairly fast. And if it’s the latter, MT should never follow single-clicked links in hover targeting mode. If this is happening, something might be wrong, and I would be happy to check your interface if you don’t mind sending me login details via out secure contact form.

However, there is also a 3rd option, which is useful if the click behaviour is triggered by JavaScript, rather than the default browser behaviour. If you target a nearby parent element of the ‘Enroll me’ link, you can move targeting down onto it by clicking the down/right directional arrows, just to the right of the Target button. Please make sure you’re using the latest version of MT as these were only added in this position recently.

I hope that helps, please let me know if you need further assistance.

Cheers,
Sebastian


bluedognz

Hi Sebastian

Thank you so much for your valuable time, I really appreciate it. I’ve tried all your options, and none of them are working so I’ve sent you login details as requested.

It’s so good to see you are well after your health scare last year, I hope you continue to be in good health.

I’m also very excited about your development with Beaver Builder, we use it exclusively for all out site builds.

Thanks again.
Clark


Sebastian

Hi Clark,

I forgot to ask which browser you’re using before. In Chrome, when I clicked the Target button to enable targeting mode, and then on the enrol button, MT selected it without following the link.

Perhaps unrealted. But one thing I did notice, which might cause some confusion at the point of applying styles, was that you still had the :active pseudo class enabled. Perhaps from when you created a previous selector. Or perhaps deliberately to apply styles only at the point when the button is being pressed. But I thought it worth raising. I’ve recently been wondering if MT should remember pseudo selectors by default, or if there should be an extra ‘lock’ option for that. It makes sense for page-id to be remembered, but possibly not the other things like :hover etc.

Here is a video showing how I targeted your enrol button, just be clear: http://screencast-o-matic.com/watch/cb1loDX8GW

P.S. I subsequently re-enabled the :active pseudo class in case you did mean to leave it enabled.

Does this help at all?

Cheers,
Sebastian


bluedognz

Hi Sebastian

I must apologise, I fear I have wasted some of your valuable time, the button I am referring to is almost at the top of the page. Although your video did help me with the process of customising the selector label.

See screenshot for clarification.

https://www.dropbox.com/s/mply2oi97qw23hf/Screenshot%202017-06-13%2011.17.54.png?dl=0

Many thanks
Clark


Sebastian

Ah, no need to apologise Clark. My bad. I did see it there the first time. I think I might know why I missed it the second time though. It’s telling me I am already enrolled in the place where the button was. This is when I’m logged in using the access details you sent me. Is there a way to unroll me?

Cheers,
Sebastian


bluedognz

Hi Sebastian

Yes, I had the same problem, I have unrolled you, and if you need to do that again, you can do so from this direct link.

https://courses.bluedogwebsites.com/wp-admin/users.php?page=WPCW_showPage_UserCourseAccess&user_id=10

Thanks
Clark


Sebastian

Hey Clark,

So I got there in the end! The 3rd option I initially suggested was necessary in this case. The button has a JavaScript event attached to it which triggers the success message when it is clicked. Microthemer can’t prevent this click behaviour during targeting. So the solution was to target the button without clicking it.

Although this was technically possible to do using the directional arrows (as I suggested before), it wasn’t obvious from the highlighting when to click the right arrow to move onto the button link element. And so in the following video, I demonstrate how to do this by expanding the advanced targeting options and then clicking the line of HTML that says ‘ENROLL NOW’. After initially targeting the buttons parent element, to get near it without triggering the click behaviour.

Watch the video example here

http://somup.com/cb12jFV1UF

I created two selectors for the button. One in its :active state (the exact moment it is being clicked), the other for its default state.

I hope that helps solve your current issue, and provides you with the means of overcoming a similar problem in future.

Cheers,
Sebastian


bluedognz

Perfect, thank you so much for your time.

You must login or register to reply to this topic.