WordPress.org

Ready to get started?Download WordPress

Forums

Plugin and and themes (3 posts)

  1. alkhimey
    Member
    Posted 6 years ago #

    Hello,

    I am writing a plugin that add a js listener to the comment's form submit button. This is done by hooking the comment form_action and printing js code to the page. To recognize the buttom I use the id of the form ('commentform'). I looked at the theme directory and noticed that this id is defined there.

    My question is, do theme makers tend to change the ids of different elemnts, or I can be shure my plugiin will work with any theme?

    Thank you.

  2. moshu
    Member
    Posted 6 years ago #

    do theme makers tend to change the ids of different elemnts,

    Yes, they do.

  3. alkhimey
    Member
    Posted 6 years ago #

    Thank you for your reply. So what should I do if I want a bit of js being executed on client side events.

    For example I want an alert message to pop when user makes a comment (hooking the onsubmit of the form).

Topic Closed

This topic has been closed to new replies.

About this Topic