Skip to content

Refactor event bindings to use .on() and optimize resize handler updates #2

Description

@JuanReyesVazquez23

Summary

Refactors event bindings in "jquery.selectareas.js" without changing the plugin's behavior.

Changes

  • Replaced deprecated ".bind()" calls with ".on()".
  • Replaced ".mousedown()" shorthand with ".on("mousedown", ...)".
  • Replaced the global selector used to hide resize handlers with the existing "$resizeHandlers" collection to avoid unnecessary DOM lookups.
  • Improved code consistency and readability.

Benefits

  • Uses the modern jQuery event API.
  • Avoids unnecessary global DOM queries.
  • Makes the code easier to maintain while preserving existing functionality.

No functional changes were introduced.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions