Load initial HTML into DIV when using jquery .load to change HTML in that DIV -


I have some basic jquery that is changing the content of a div. The only thing that I can not know is how it shows one of the four external HTML files (e.g., Lookbook 20141217. HTML) when the page is first loaded. Right now, the container DIV "lookBookWindow" is empty unless one of the "buttons" is clicked.

HTML

  & lt; Div id = "lookBookMain" & gt; & Lt; Div id = "lookbookwindow" & gt; & Lt; / Div & gt; & Lt; Input id = "lookbook20141217" class = "thumbnail RM" type = "image" src = "thumbnail / 20141217.jpg" alt = "mauris lookbook 20141217" width = "220" height = "220" range = "0" /> ; & Lt; Input id = "lookbook20141114" class = "thumbnail RM" type = "image" src = "thumbnail / 20141114.jpg" alt = "Maurice Lookbook 20141114" width = "220" height = "220" range = "0" /> ; & Lt; Input id = "lookbook20141018" class = "thumbnail RM" type = "image" src = "thumbnail / 20141018.jpg" alt = "Maurice Lookbook 20141018" width = "220" height = "220" limit = "0" /> ; & Lt; Input id = "lookbook20141016" class = "thumbnail" type = "image" src = "thumbnail / 20141016.jpg" alt = "Maurice Lookbook 20141016" width = "220" height = "220" limit = "0" /> & Lt; / Div & gt;  

css

  #lookBookMain {width: 940px; Margin: 0 px auto; Padding: 0 pixels; Status: Relative; } #lookBookWindow {width: 940px; Height: 580 pixels; Margin: 0 px; Padding: 0 pixels; }. Thumbnail {width: 220px; Height: 220 pixels; Margin: 0 px; Padding: 20px 0px 0px 0px; Status: Relative; Swim left; } Input. Thumbnail: Focus {Outline-width: 0; } .rm {margin-right: 20px; }  

JQUERY

  $ ('input [type = "image"]). Click (function () {var pageName = this.id; $ ('# LookBookWindow'). Load (PageName + '.html');});  

I think it should be just another line in jquery, but I do not know what should I do online online thanks in advance!

If you want to load a specific page, simply .load () '). Click (function () {var pageName = this.id; $ ('# lookBookWindow'). Load (PageName + '.html');}). first (). Click ();


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -