JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 21st, 2013, 06:08 PM
maintour maintour is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 maintour User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 37 sec
Reputation Power: 0
jQuery - Linking image tiles with JavaScript

I'm trying to use Javascript to recreate something from GoogleMaps. I've successfully created a draggable picture object. Now I'm looking for some clues of how to "glue" two or more image tiles together. And yes, I'll assume that they are all identical square images for ease of use. I believe this could all be handled through JavaScript.

Reply With Quote
  #2  
Old February 21st, 2013, 10:43 PM
web_loone08's Avatar
web_loone08 web_loone08 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2008
Posts: 599 web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 40 m
Reputation Power: 69
You can combine the two titles; like so:

Code:
<script>

function reTitle(img1,img2)
{
var pic1 = document.getElementById(img1);
var pic2 = document.getElementById(img2);
pic1.title = pic1.title + pic2.title;
pic2.title = pic1.title;
}

window.onload = function() {
new reTitle('pic1','pic2');
new reTitle('pic3','pic4');
}

</script>

<img id="pic1" src="any.jpg" title="any"/>
<img id="pic2" src="body.jpg" title="body"/>

<img id="pic3" src="can.jpg" title="can"/>
<img id="pic4" src="not.jpg" title="not"/>

Reply With Quote
  #3  
Old February 22nd, 2013, 06:19 PM
maintour maintour is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 5 maintour User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 29 m 37 sec
Reputation Power: 0
Hi Web Loonie -

I meant picture tiles - not titles.
Kinda like how GoogleMaps groups a whole bunch of map tiles into one giant object.

Reply With Quote
  #4  
Old February 22nd, 2013, 10:07 PM
web_loone08's Avatar
web_loone08 web_loone08 is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2008
Posts: 599 web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level)web_loone08 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 12 h 40 m
Reputation Power: 69
Haha, miss read what you were wanting... sry. Look into HTML5 Canvas; you should be able to find some examples of combining two or more imgs onto a Canvas using JavaScript.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > jQuery - Linking image tiles with JavaScript

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap