» » jQuery election seat reservations online (theater piece)

 

jQuery election seat reservations online (theater piece)

Author: bamboo06 on 17-11-2014, 00:58, views: 99843

76
When our online ticketing (such as movie tickets, tickets, etc.) can choose their own seat. Developers listed seating seats on the page, the user can see at a glance the seat and payment can be selected. In this paper, cinema tickets, for example, to show you how to choose seats, seat selection data processing.

Here, I'll give you about a jQuery plugin based online seat selection: jQuery Seat Charts, it supports custom seat types and prices, support for custom styles, support settings are not optional seat, also supports keyboard control seat.
HTML
We assume that entered the film "Gingerclown" The seat selection page, the page layout see the big picture above, left of the page will appear in the # seat-map in theater seating layout, the right side of # booking-details display movie-related information as well as selected seating information # selected-seats and fares amounts of information, choose your seat confirmed after payment page to complete the payment.
   <div class="demo">
   		<div id="seat-map">
			<div class="front">SCREEN</div>					
		</div>
		<div class="booking-details">
			<p>Movie: <span> Gingerclown</span></p>
			<p>Time: <span>November 3, 21:00</span></p>
			<p>Seat: </p>
			<ul id="selected-seats"></ul>
			<p>Tickets: <span id="counter">0</span></p>
			<p>Total: <b>$<span id="total">0</span></b></p>
					
			<button class="checkout-button">BUY</button>
					
			<div id="legend"></div>
		</div>
		<div style="clear:both"></div>
   </div>

CSS
Use CSS to beautify the various elements of the page, especially seating list layout for the seat status (sold, optional seats, has been elected seats, etc.) set up different styles, we have collated CSS code, of course, you can own project page style themselves modify any CSS code.
.front{width: 300px;margin: 5px 32px 45px 32px;background-color: #f0f0f0; color: #666;text-align: center;padding: 3px;border-radius: 5px;} 
.booking-details {float: right;position: relative;width:200px;height: 450px; } 
.booking-details h3 {margin: 5px 5px 0 0;font-size: 16px;} 
.booking-details p{line-height:26px; font-size:16px; color:#999} 
.booking-details p span{color:#666} 
div.seatCharts-cell {color: #182C4E;height: 25px;width: 25px;line-height: 25px;margin: 3px;float: left;text-align: center;outline: none;font-size: 13px;} 
div.seatCharts-seat {color: #fff;cursor: pointer;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius: 5px;} 
div.seatCharts-row {height: 35px;} 
div.seatCharts-seat.available {background-color: #B9DEA0;} 
div.seatCharts-seat.focused {background-color: #76B474;border: none;} 
div.seatCharts-seat.selected {background-color: #E6CAC4;} 
div.seatCharts-seat.unavailable {background-color: #472B34;cursor: not-allowed;} 
div.seatCharts-container {border-right: 1px dotted #adadad;width: 400px;padding: 20px;float: left;} 
div.seatCharts-legend {padding-left: 0px;position: absolute;bottom: 16px;} 
ul.seatCharts-legendList {padding-left: 0px;} 
.seatCharts-legendItem{float:left; width:90px;margin-top: 10px;line-height: 2;} 
span.seatCharts-legendDescription {margin-left: 5px;line-height: 30px;} 
.checkout-button {display: block;width:80px; height:24px; line-height:20px;margin: 10px auto;border:1px solid #999;font-size: 14px; cursor:pointer} 
#selected-seats {max-height: 150px;overflow-y: auto;overflow-x: none;width: 200px;} 
#selected-seats li{float:left; width:72px; height:26px; line-height:26px; border:1px solid #d3d3d3; background:#f7f7f7; margin:6px; font-size:14px; font-weight:bold; text-align:center} 

jQuery
This example is based on jQuery, so do not forget to load jquery library and the first elected seat plugins: jQuery Seat Charts.
<script type="text/javascript" src="jquery.js"></script> 
<script type="text/javascript" src="jquery.seat-charts.min.js"></script> 

Next, we define such a good fare, seating area, the number of votes, a total amount of such elements, then call the plugin:. $ ('# Seat-map') seatCharts ().
We first set up seating chart, an auditorium seating is fixed good. In this example, the third row is the aisle, as well as 34 rows to the right vacancy exports, the last row we set up a couple of blocks, then the theater's layout is this:
aaaaaaaaaa
aaaaaaaaaa
__________
aaaaaaaa__
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aaaaaaaaaa
aa__aa__aa
We use the letter A represents a seat, represented by the symbol _ empty, ie no seats, of course, you can also use a, b, c, etc. represent different levels of seating.
Then define the legend style, the key is detective click event click (): When the user clicks on the seat, if the seat status is optional (available), then click on the rear seat, the seat information (several rows) was added to the right of the selected Block list and calculate the total number of votes and the total amount; if the seat status is checked (selected), then click on the seat again, it will be selected seating information is deleted from the list on the right seat, and the state is set to election; if the seat status is already sold (unavailable), you can not click on the seat. Seat number last used state get () method to set Sold Sold. The following is a detailed code:
var price = 10; //price
$(document).ready(function() {
	var $cart = $('#selected-seats'), //Sitting Area
	$counter = $('#counter'), //Votes
	$total = $('#total'); //Total money
	
	var sc = $('#seat-map').seatCharts({
		map: [  //Seating chart
			'aaaaaaaaaa',
            'aaaaaaaaaa',
            '__________',
            'aaaaaaaa__',
            'aaaaaaaaaa',
			'aaaaaaaaaa',
			'aaaaaaaaaa',
			'aaaaaaaaaa',
			'aaaaaaaaaa',
            'aa__aa__aa'
		],
		naming : {
			top : false,
			getLabel : function (character, row, column) {
				return column;
			}
		},
		legend : { //Definition legend
			node : $('#legend'),
			items : [
				[ 'a', 'available',   'Option' ],
				[ 'a', 'unavailable', 'Sold']
			]					
		},
		click: function () { //Click event
			if (this.status() == 'available') { //optional seat
				$('<li>R'+(this.settings.row+1)+' S'+this.settings.label+'</li>')
					.attr('id', 'cart-item-'+this.settings.id)
					.data('seatId', this.settings.id)
					.appendTo($cart);

				$counter.text(sc.find('selected').length+1);
				$total.text(recalculateTotal(sc)+price);
							
				return 'selected';
			} else if (this.status() == 'selected') { //Checked
					//Update Number
					$counter.text(sc.find('selected').length-1);
					//update totalnum
					$total.text(recalculateTotal(sc)-price);
						
					//Delete reservation
					$('#cart-item-'+this.settings.id).remove();
					//optional
					return 'available';
			} else if (this.status() == 'unavailable') { //sold
				return 'unavailable';
			} else {
				return this.style();
			}
		}
	});
	//sold seat
	sc.get(['1_2', '4_4','4_5','6_6','6_7','8_5','8_6','8_7','8_8', '10_1', '10_2']).status('unavailable');
		
});
//sum total money
function recalculateTotal(sc) {
	var total = 0;
	sc.find('selected').each(function () {
		total += price;
	});
			
	return total;
}

Explanation
jQuery Seat Charts plugin provides multiple options to set and method calls, specifically with reference to the project's official website: https: //github.com/mateuszmarkowski/jQuery-Seat-Charts.
Next, GOOCODE will provide you with jQuery Seat Charts richer application example, we can use the plug-in applications to the aircraft cabin seat selection, train / car seat selection, conference tournament election seat auditorium, a restaurant restaurant seat selection, etc. Please pay attention to our site.

Category: Javascript / Plugins

Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.
<
  • 0 Comments
  • 0 Articles
9 October 2017 05:42

Ralphchuro

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Отличные строительные советы здесь akvakraska.ru
Отличные строительные советы здесь ctoday.ru
Отличные строительные советы здесь sportdon.ru
Отличные строительные советы здесь wtsolutions.ru

<
  • 0 Comments
  • 0 Articles
9 October 2017 10:17

prwaskfuh

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
A-parser купить 2017 SE::Yandex::TIC SE::Yandex::TIC Проверка тематического индекса цитирования домена в Яндексе
Один из пользователей BlackSeoForum.TOP хочет продать A-parser версии Enterpise, цена 150 usd
Также продаётся GSA Search Engine Ranker, GSA SEO Indexer, GSA Platform Identifier вместе за 100 usd
Весь вышеописанный софт за 190 USD

Купить A-Parser


Net::Whois Net::Whois Определяет зарегистрирован ли домен, дату создания домена, а так же дату окончания регистрации и NS сервера

A-parser купить 2017 SE::Yahoo SE::Yahoo A-parser купить поисковой выдачи Yahoo
Один из пользователей BlackSeoForum.TOP хочет продать A-parser версии Enterpise, цена 150 usd
Также продаётся GSA Search Engine Ranker, GSA SEO Indexer, GSA Platform Identifier вместе за 100 usd
Весь вышеописанный софт за 190 USD

http://a-parser.c0.pl/kupit-a-parser/


SE::YouTube SE::YouTube A-parser купить поисковой выдачи YouTube

Купить A-Parser 2017 HTML::LinkExtractor HTML::LinkExtractor A-parser купить внешних и внутренних ссылок с указанного сайта, может проходить по внутренним ссылкам до выбранного уровня
Один из пользователей BlackSeoForum.TOP хочет продать A-parser версии Enterpise, цена 150 usd
Также продаётся GSA Search Engine Ranker, GSA SEO Indexer, GSA Platform Identifier вместе за 100 usd
Весь вышеописанный софт за 190 USD

A-parser купить


HTML::TextExtractor HTML::TextExtractor A-parser купить текстовых блоков, позволяет собирать контент с произвольных сайтов

A-parser купить 2017 SEO::ping SEO::ping Массовая отправка Ping запросов в сервисы поддерживающие Weblog API(Google Blog Search, Feed Burner, Ping-o-Matic и т.п.)
Один из пользователей BlackSeoForum.TOP хочет продать A-parser версии Enterpise, цена 150 usd
Также продаётся GSA Search Engine Ranker, GSA SEO Indexer, GSA Platform Identifier вместе за 100 usd
Весь вышеописанный софт за 190 USD

A-parser купить


Check::RosKomNadzor Check::RosKomNadzor Проверка сайта в базе Роскомнадзора

A-parser купить 2017 SE::Google::Compromised SE::Google::Compromised Проверка наличия надписи This site may be hacked в гугле
Один из пользователей BlackSeoForum.TOP хочет продать A-parser версии Enterpise, цена 150 usd
Также продаётся GSA Search Engine Ranker, GSA SEO Indexer, GSA Platform Identifier вместе за 100 usd
Весь вышеописанный софт за 190 USD

http://a-parser.c0.pl/kupit-a-parser/


SE::Google::SafeBrowsing SE::Google::SafeBrowsing Проверка домена в блеклисте гугла (подпись harm в выдачи)

<
  • 0 Comments
  • 0 Articles
11 October 2017 15:59

DarleneSkedy

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Pozyczka http://home.putclub.com/link.php?url=http://pozyczka-9h.cba.pl/id-162rp.php Marza kredytu Sierpc

Pozyczka Kredyt hipoteczny pko bp kalkulator Lapy Pozyczka bez zaswiadczen o zarobkach Piotrkow Kujawski http://mobiletop.ru/cgi-bin/top100/out.cgi?id=radicoru&url=http://pozyczka-9h.cb
a.pl/id-1494dp.php

Pozyczka Chwilowki bez bik online Klodzko Pozyczka chwilowka Knurow http://www.prep21.com/members/jannettechitwo/activity/103479/

Pozyczka Pozyczki prywatne pod weksel Janow Prometeusz pozyczki Walcz http://www.careerprofilemanager.net/__media__/js/netsoltrademark.php?d=pozyczka-
9h.cba.pl%2Fid-328jp.php

Pozyczka Chwilowki wroclaw Czluchow Szybka gotowka pl Radlin http://deepimpact.us/__media__/js/netsoltrademark.php?d=pozyczka-9h.cba.pl%2Fid-
7yp.php

Pozyczka Ranking pozyczek gotowkowych Skepe Pozyczki pozabankowe dla zadluzonych z komornikiem Lukow http://royalbombay.com/wordpress/this-is-gallery-post-heading-5/

Pozyczka Kredyt w pko bp Drawsko Pomorskie Sowa pozyczki Stawiszyn http://nonprofitnexus.com/__media__/js/netsoltrademark.php?d=pozyczka-9h.cba.pl%
2Fid-1773ip.php&g2_returnName=Album

Pozyczka Kredyt we franku Namyslow Chwilowki dla firm Belzyce http://abenteuerteam.de/redirect/?url=http://pozyczka-9h.cba.pl/id-1181zp.php

Pozyczka Kredyt w mbanku Cieszyn Chwilowki legnica Rydzyna https://seedspost.ru/bitrix/rk.php?goto=http://pozyczka-9h.cba.pl/id-1915yp.php

Pozyczka Pozyczka plus Gorzno Kredyty we frankach forum Starachowice http://beveragefactory.de/__media__/js/netsoltrademark.php?d=pozyczka-9h.cba.pl%
2Fid-2020ip.php

Pozyczka Tania pozyczka Kazimierz Dolny Kredyty gotowkowe porownanie Szubin http://heartmindersng.com/2016/04/interview-judith-audu-opens-up-abou/

<
  • 0 Comments
  • 0 Articles
12 October 2017 05:02

DarleneSkedy

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Pozyczka Kredyty online w 15 minut Zloty Stok Szybka pozyczka com opinie Puszczykowo http://www.graenzpfluderiwaggis.de/index.php/gaestebuch?50

Pozyczka Najkorzystniejszy kredyt Krapkowice Marza kredytow hipotecznych Laskarzew http://www.google.com.bh/url?q=http://pozyczka-9h.cba.pl/id-1472op.php

Pozyczka Prodomo pozyczki Bierutow Optima kredyt Wabrzezno http://initialreflections.com/__media__/js/netsoltrademark.php?d=pozyczka-9h.cba
.pl%2Fid-1891yp.php

Pozyczka Szybka gotowka opinie Stoczek Lukowski Pozyczka jeremie Tolkmicko http://bloomlankaholidays.com/?option=com_k2&view=itemlist&task=user&id=30218

Pozyczka Pozyczka hipoteczna Kwidzyn Szybkie pozyczki w domu klienta Lipsko http://www.shayashi.jp/xoopsMain/html/modules/wordpress/wp-ktai.php?view=redir&u
rl=http://pozyczka-9h.cba.pl/id-352mp.php

<
  • 0 Comments
  • 0 Articles
14 October 2017 14:48

Josephzewly

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Potrzebna kasa? prywatne pozyczki weksel Zaden problem! kod na kredyt orange 100% online. Wypelnij tylko formularz pozyczka online bez bik na raty.

Potrzebna kasa? pozyczka plus logowanie Zaden problem! smart pozyczka opinie 100% online. Wypelnij tylko formularz pozyczka vivus opinie.

<
  • 0 Comments
  • 0 Articles
2 November 2017 21:38

xhahzad

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Quote: Allan Souza
Hi,
I added jquery.seat-charts.min.js in my project
but it didnt display the layout.
Please Help me



you have to include jquery.js in your project ... then it will be run easily

<
  • 0 Comments
  • 0 Articles
3 November 2017 11:00

SherryVoste

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Анекдот - устное народное творчество

yanekdots.ru
<a href=http://yanekdots.ru>Анекдоты</a>
Лучшие анекдоты
Избранные анекдоты
<a href=http://yanekdots.ru>yanekdots.ru</a>

<
  • 0 Comments
  • 0 Articles
3 November 2017 18:30

Ivanmaype

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
mail order pharmacies
<a href="http://canadianpharmacyseo.us/">canadian pharmacy</a> best price prescription drugs
canadian pharmacies shipping to usa

<
  • 0 Comments
  • 0 Articles
8 November 2017 08:14

AnthonyReEte

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Kudos! Helpful stuff!
canadianpharmaciesbnt.com
canada pharmacy online no script

<
  • 0 Comments
  • 0 Articles
11 November 2017 13:34

Gawru0j

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Czesc mezczyzni Potrzebna kasa albo pozyczka online szybko?
Zaden problem! http://loftcars.gdn/map9.php - Wypowiedzenie Umowy Kredytu Hipotecznego

Dzien dobry chlopcy Potrzebna kasa albo rzeczywisty koszt kredytu?
Zaden problem! http://loftcars.site/map3.php, Kredyt Plus Gsm

Czesc kobiety Potrzebna kasa albo ekspresowa pozyczka online?
Zaden problem! http://supervices.gdn/map7.php i Kredyt We Frankach Forum

<
  • 0 Comments
  • 0 Articles
14 November 2017 03:32

DarylWab

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
锘?

Vidmate is certainly practical application that allows you to get vidmate media as well as songs inside the Youtube, Metacafe, Vimeo, Soundcloud and as a result from the opposite favorite multi media rrnternet sites. now this instance enables download and read a variety of dvds nicely songs of numerous personality. confident, capable to install some large in computer and even music that you would like to. you can easily obtain full hd (hd) video clips proper here to boot. All genuine and dealing find hyperlinks are provided over here however, you don鈥檛 worry about that in the slightest. It allows you to look at the video lessons or a songs without delay without the need for them to be vidmate purchased. downloads - vidmate practical application.

<
  • 0 Comments
  • 0 Articles
15 November 2017 13:01

RobertWek

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Модные женские советы здесь dicask.ru

<
  • 0 Comments
  • 0 Articles
15 November 2017 19:59

Girish N L

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
anyone have this one for angular2 with out jquery and jvavscript

<
  • 0 Comments
  • 0 Articles
21 November 2017 11:14

HaywoodsUs

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Одним из самых популярных видов облицовки пола является плитка напольная. Ассортимент этих материалов довольно широк и многообразен, поэтому выбрать плитку напольную становится все труднее, из-за богатства выбора. В настоящее время в магазине можно встретить от 15 наименований плитки, различной по диаметру и форме, подробнее об этом читайте на сайте teletap.org

<
  • 0 Comments
  • 0 Articles
29 November 2017 21:52

judee

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
JQuery is a very useful programming language and I recommend you to learn it. javascript is more difficult than JQuery and you have to learn javascript to learn web development. help with assignment

<
  • 0 Comments
  • 0 Articles
15 December 2017 22:18

KennethMib

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Приветствую! интересный у вас сайт!
Нашел интересную базу кино: Лучшие ужасы список 2017
Здесь: http://kinobibly.ru/drama/4572-vavilon-5-babylon-5-sezon-1-5-1994-1998.html Смотреть Вавилон 5 / Babylon 5 (Сезон 1-5) (1994-1998) онлайн бесплатно
Тут: http://kinobibly.ru/kinonewz/4514-paramount-ischet-rezhissera-dlya-zvezdnogo-put
i-3.html
Здесь: http://kinobibly.ru/uzhasy/ Лучшие ужасы 2017 список
Тут: Лучшая фантастика 2017 список
Здесь: 2017 список лучшие мультфильмы 2017 список лучшие мультфильмы

Previous Next
Information
Comment on the news site is possible only within (days) days from the date of publication.