Js Selector Question

Asked 2 years ago, Updated 2 years ago, 44 views

Hi, how are you?

<!-- html -->
<style>
    foo {
        border-right: 1px solid black;
    }
</style>
<div id="foo"></div>
$('#foo').mosedown(function(e) {
    // // event code
}

I want to process the mouse event only on the border-right part when I choose from js.

The entire div tag is processed as a mouse event, so I can't write the code I want

Is there a good way?

html5 javascript

2022-09-22 19:16

1 Answers

<div="foo"></div> It's written like this.

I want to give an effect, but why don't you just give me id="foo"?

https://jsfiddle.net/h4yvsq8x/15/ It's nothing special.

It's a sloppy answer, but if you have any problems, please comment! <


2022-09-22 19:16

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.