image popup js close button
$('.menu').mouseover(function(e) {
console.log(e);
var href = $(this).attr('href');
var popup = $('<div id="myPopup"></div>');
var image = $('<img id="image" src="' + href + '"/>');
popup.append(image);
var text = $('<p>My Text</p>');
popup.append(text);
var closeBtn = $('<button>X</button>');
popup.append(closeBtn);
popup.css('top', e.pageY + offsetY).css('left', e.pageX + offsetX);
popup.append('body');
closeBtn.button().click(function() {
$('#myPopup').remove();
});
}, function(e) {
// do nothing
});
Also in JavaScript:
- javascript remove item onclick
- javascript looping through object
- total cost example in javascript with function
- date picker type react
- js scroll to bottom of element
- turning an hex code to rgb discord.js
- making promises in js
- javascript how to sort variables by user input
- javascript loop through array backwords
- new component in angular command
- help source code discord.js
- how to add toaster in angular 9
- js map value in range
- js detect mouse support
- count value a to b character javascript
- google analytics nextjs
- add class jquery
- filter in react native video
- react redux middleware
- single node elasticsearch with enable security basic in docker
- javascript full screen div
- linked list javascript
- download datepicker js
- ojs link privacy page