class LoginFormComponent extends React.Component {
handleSubmit = () => {
console.log(this.model); // 123
}
componentDidMount() {
this.model = 123;
}
render() {
console.log(this.model); //123
var styles = this.props.styles;
return (
<CM.MUI.FlatButton
style={styles.buttonStyle}
onClick={this.handleSubmit}
label={CM.gettext("Login")}
/>
);
}
}
export default LoginFormComponent;
jQuery(document).ready(function($){
$(window).on('scroll', function(){
if($(window).scrollTop() < $('#element').offset().top){
$('.menu').removeClass('addclass');
}
});
});
jQuery(document).ready(function($){
$(window).on('scroll', function(){
if($(window).scrollTop() >= $('#element').offset().top){
$('.menu').addClass('addclass');
}
else
{
$('.menu').toggleClass('addclass');
//or use $('.menu').removeClass('addclass');
}
});
});