The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Changing target HTM...
 
Share:
Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Solved] Changing target HTML # element for comment bubble

7 Posts
2 Users
0 Reactions
804 Views
Posts: 24
Topic starter
(@willgreeny)
Eminent Member
Joined: 3 years ago

Hi there,

The comment bubble is great. However, is there a way to make it target a different HTML? For example, the comments are disabled for people that are logged in and a member (I want the comment bubble to scroll to the HTML element above the comments to explain how to sign up and the benefits of it (such as commenting etc.).

Kind regards,

 

Will

6 Replies
Asti
Posts: 8075
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

Hi Will,

I'll ask the developers and get back to you once I get a response from them. 

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

You should overwrite the JS codes that are added for the id="wpd-bubble".

In other words, this can be reached using the JS codes.

Posts: 24
Topic starter
(@willgreeny)
Eminent Member
Joined: 3 years ago

Thank you - can you provide me the way to actually do this?

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

@willgreeny,

You can use this function. If it's necessary you should modify it: 

let $= jQuery; 
$('body').on('click', '#wpd-bubble', function(){ let d = $('#poetry-plus-comments'); if( d.length ){ setTimeout( function(){ $('html').scrollTop( (d.offset().top - 100) ) }, 1000 )  } } );
Posts: 24
Topic starter
(@willgreeny)
Eminent Member
Joined: 3 years ago

Hello,

I implemented this on the page, but unfortunately it does not seem to work?

1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8075

The code should work fine. We've checked it one more time.

Please check out this article: https://www.wpbeginner.com/wp-tutorials/how-to-easily-add-javascript-in-wordpress-pages-or-posts/

Share: