0
I used jQuery-Seat-Charts to make a layout and reserve seats, the problem is that when it is on mobile I wanted otherwise.
On desktop is like this:
map: [
'a[,4]a[,8]a[,12]a[,16]a[,20]a[,24]a[,28]a[,32]a[,36]a[,40]a[,44]a[,48]a[,53]',
'a[,3]a[,7]a[,11]a[,15]a[,19]a[,23]a[,27]a[,31]a[,35]a[,39]a[,43]a[,47]a[,52]',
'____________a[,51]',
'a[,2]a[,6]a[,10]a[,14]a[,18]a[,22]a[,26]a[,30]a[,34]a[,38]a[,42]a[,46]a[,50]',
'a[,1]a[,5]a[,9]a[,13]a[,17]a[,21]a[,25]a[,29]a[,33]a[,37]a[,41]a[,45]a[,49]',
],
And on mobile I want it like this:
map:[
'aa_aa',
'aa_aa',
'aa_aa',
'aa_aa',
'aa_aa',
'aa_aa',
'aa_aa',
'aa_aa',
'aa_aa',
'aaaaa',
],
Right now it’s like this for mobile and desktop: And I want it to stay that way on mobile:
The link you have placed does not seem to be working and the logic of what you want to do is not entirely clear. Start by explaining the logic of transformation and give more specific examples. For me it is not clear how it arrives from initial to final.
– Isac
@Isac I updated the question and the link I hope I was more specific :)
– Francisco Ferreira
confused what you want to do, but if you want to change the
javascript
according to mobile or not, you should testnavigator.userAgent
, see for example in this answer: https://stackoverflow.com/a/3540295/4730201– Ricardo Pontual
If I understand the way this plugin works, your final example is not consistent with the first, because it does not explicitly indicate each of the number of places, as it did in the first. Start by updating this part to be clear
– Isac