Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Publication Station
Search
Editing
Courses/Schijt aan je Site
From Publication Station
Namespaces
Page
Discussion
More
More
Page actions
Read
Edit
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
'''Voorbeeld Bookmarklet''' Maak in je browser een nieuwe bookmark, maar in plaats van een web adres (url) vul je het volgende scriptje in: javascript:(function(){alert('Je bookmarklet werkt!');})(); Als je nu naar een website gaat en je klikt op deze bookmark, gaat je browser de bijbehorende javascript uitvoeren op die pagina. In plaats van de alert kun je alle javascript gebruiken die je maar wilt, je kunt zo dus ook de pagina aanpassen. '''Een bookmarklet met jQuery''' <nowiki>javascript:(function(){ var fileref=document.createElement('script'); fileref.setAttribute("type","text/javascript"); fileref.setAttribute("src", "http://code.jquery.com/jquery-2.1.4.min.js"); window.setTimeout(main,1000); function main(){ alert('dit werkt'); $("a").hover(function(){ $(this).hide(); }); }; })(); </nowiki> '''Common Annoyances''' * Media autoplaying in the background * Pop-ups * Annoying hover animations * Non-pausing sliding pictures * Pop-up with a question when opening website * Disable Right Click * Stop Browser Resize * Auto Refresh Page * Make Sure Users Meant To Close The Window * Resize Window To Certain Resolution * Disable The Ctrl Key * Make All Links Open In New Window * Disable Scrolling http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ http://www.paulund.co.uk/a-list-of-annoying-jquery-functions [[Category:teaching]] Hallo, misschien leuk om te hebben? $("body").html($("body").html().replace(new RegExp(' de ', 'g'), ' de fucking ')); De heer van Beek heeft ons verblijd met de volgende geniale implementatie: <nowiki>function main(){ var plaatje; alert('dit werkt'); $("img").hover(function(e){ plaatje = $(this); }); $(document).bind('mousemove',function(e){ plaatje.clone().css('position','fixed').css('top',e.pageY).css('left',e.pageX).appendTo("body"); }); }; </nowiki>
Summary:
Please note that all contributions to Publication Station are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Publication Station:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Main navigation
Main page
Printmaking Studio
Print Studio
Dig. Publishing Studio
Namespaces
Grafiwiki
Random Page
Log in
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs