-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I'm a little confused about the example: I have
handleScriptCreate() {
this.setState({ scriptLoaded: false })
}
handleScriptError() {
this.setState({ scriptError: true })
}
handleScriptLoad() {
console.log(this)
this.setState({ scriptLoaded: true })
$('body').click(function(){
alert('up')
})
}
render() {
return(
<Script
url="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"
onCreate={this.handleScriptCreate.bind(this)}
onError={this.handleScriptError.bind(this)}
onLoad={this.handleScriptLoad.bind(this)}
/>
)
}
and I'm getting a error '$' is not defined
. jQuery in component did mount doesn't work either. What am I doing wrong?
melounek, njho, jmdelgadoh and ArtixZ
Metadata
Metadata
Assignees
Labels
No labels