Comments (1)
That's a very interesting problem. The easiest way could be to disable user interactions by overriding at least click handler and possibly focus/blur depending on what your requirements are. Then you know that user won't be able to pick his own seat (at least client-side) so you can freely do it for the user:
$('#seat-map')
//get the seatCharts object
.seatCharts()
//find all available seats in "f" section, you can skip f if you want to search the whole map
.find('f.available')
//get the first available seat (be sure to check length in case there're no available seats)
.seats[0]
//change the seat status to selected
.status('selected')
If user can specify how many general admission tickets he wants, you can use .each() to iterate over a few first seats available instead of directly accessing the first one.
from jquery-seat-charts.
Related Issues (20)
- the first seat is changed green when clicked blank area HOT 1
- Testing
- Empty seats skip sorting problems HOT 1
- How do I change seats in mobile?
- Make seat chart responsive and scalable HOT 3
- Click on chart space in a map bigger then screen moves map up.
- Skip Seat Numbers for each underscore character HOT 5
- dynamic kinds of seats
- this.data() show empty when i click
- lost focus when remap
- 当座位区域出现滚动条时,滚动到底部后,点击选座区域里的空白处后,区域会滚动顶部是什么原因?
- First seat gets selected when clicking elsewhere HOT 4
- Dynamic Seats with Php
- Different columns same map
- generar 2 mapas de asientos sin separar
- Shitty Repo HOT 2
- Old Selected Seats Are there in New Seatchart
- Unicode in Seat Label
- Tooltip when focused
- Individual seat pricing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-seat-charts.