JQuery

Dynamically load Scripts that are self finding

Posted By: Ian on Feb 16, 2014 in JQuery
Last modified on January 29th, 2015 at 9:31 pm,

Q. I’m making a widget and i want the end user to only have to insert 1 line into the webpage and my script to do the rest. A. OK well as a demonstration were going to create a simple widget (Not a true widget but you get the idea) that loads 1 JavaScript, 1 …

Continue Reading »

Ajax link tracker

Posted By: Ian on Feb 15, 2014 in JQuery
Last modified on January 29th, 2015 at 9:31 pm,

Q. How can i record all the external links clicked on my site so i can see where they are when they click on the link, where they came from before and where there going? A. Add the script below to your pages and the information will be sent too count.php for you to manipulate …

Continue Reading »

Add StyleSheet from Drop Down Menu with jQuery and PHP

Posted By: Ian on Nov 19, 2013 in JQuery, PHP, Snippets
Last modified on January 29th, 2015 at 9:31 pm,

Following on from the Snippet add and remove stylesheets with jquery I now show you how to list all the stylesheets from a folder into a drop down menu and append the selected one to the head.     Yea but i don’t want to use a different folder? No problem simply add your folder path …

Continue Reading »

jQuery append, prepend and remove

Posted By: Ian on Nov 10, 2013 in JQuery
Last modified on January 29th, 2015 at 9:31 pm,

Simple job list using the jQuery append, prepend and remove methods For the purpose of this demo i describe the methods in how they are used for the job list. append – add new job to the end of the list. prepend – add new job to the beginning of the list. remove – remove …

Continue Reading »

Alert User When Clicking On 3rd Party Link

Posted By: Ian on Jan 10, 2013 in JQuery
Last modified on June 27th, 2016 at 9:32 pm,

Recently i was asked to come up with a script to alert the End User when they were leaving a website when they clicked on an external link and this is what i came up with after finding a similar script which opens all external links into a new window. Whilst opening external links into …

Continue Reading »

Let your users toggle your Adverts with an advert switch!

Posted By: Ian on Jan 05, 2013 in JQuery
Last modified on January 29th, 2015 at 9:31 pm,

Using HTML5 localStorage and a little JQuery we can make an advert switch giving our visitors the option to turn our adverts on and off. Simply save the JQuery script below in your scripts folder and then add a link to it in the head of your page. <script type=”text/javascript”> /** * Declare global variable …

Continue Reading »

LocalStorage Background Colour Changer

Posted By: Ian on Dec 23, 2012 in JQuery
Last modified on January 29th, 2015 at 9:31 pm,

Just a couple of examples of how to use HTML5 LocalStorage feature as a background colour changer. Example 1 the simpler example takes the value of whatever you type in the box and stores that in localStorage and sets it as background colour using jQuery. <script type=”text/javascript”> /** * Check if localStorage is supported and …

Continue Reading »

jQuery Add and Remove stylesheets

Posted By: Ian on Jan 24, 2012 in JQuery
Last modified on February 26th, 2014 at 11:27 am,

If your looking to enhance the experience of your visitors by offering them the ability of changing the layout and or colours on your webpage then this jQuery snippet could be handy for you. With the use of cookies or even better the new HTML5 local storage feature the users preferences will be saved on …

Continue Reading »

Get the Page Title Description and Url

Posted By: Ian on Mar 09, 2011 in JavaScript, JQuery, Snippets
Last modified on January 12th, 2013 at 3:09 pm,

JQuery version: <script type=”text/javascript”> $(document).ready(function () { var pageTitle = $(document).attr(‘title’); var pageHref = $(location).attr(‘href’); var pageDescription = $(‘meta[name=description]’).attr(“content”); $(‘#result’).html(‘<a href=”‘ + pageHref + ‘”>’ + pageTitle + ‘</a><br />’ + pageDescription + ‘<br /><span class=”green”>’ + pageHref + ‘</span>’); }); </script>   Javascript Version: <script type=”text/javascript”> var a = (document.title); var b = (document.location.href); …

Continue Reading »

About This Site

Dreams are built from lines of code well it's true!
If you can dream it you can usually code it.

I have learned so much from other people on the Internet and this site is for me to give back some of what i have learned and hope people can now learn from me.
Have fun and surf safely,
Ian.J.Gough

protected by copyscape duplicate content check

Categories


Powered by Banner Bar 125