javascript - Twitter button not showing if initially hidden -


i have twitter button on page using widget. button renders should unless place hidden container.

i place share button hidden container shows when clicked. have of functionality working, twitter button not show if placed hidden container.

you use css tag display: none remove tag when click button , add tag whenever done sharing twitter.

something this:

html

<input type="button" class="clickme" value="click me" /> <img src="img/twitter.png" class="twitterpic hideme" /> 

css

assuming have separate style sheet.

.hideme { display: none;} 

javascript

$(".clickme").on("click", function () {     $(".twitterpic").removeclass("hideme"); }); 

here links jquery pages add , remove classes:

https://api.jquery.com/removeclass/

https://api.jquery.com/addclass/


Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -