I am using Zurb Foundation and Orbit slider to display product images on my clients website. He has requested that when you select a package from the dropdown list that it should change the image to the one that is relevant to that package. So he can now link the image to the package ID in the database and actually this all works fine now using my desktop. But when using my Ipad, changing the dropdown box has no effect on the image whatsoever.
Can anyone tell me why? And how I could fix this? As most of our customers actually come from Tablet and Mobile rather than Desktop, this is a real issue at the moment.
Many thanks
Example:
http://www.bitandpiecesvape.co.uk/shop/atomisers-and-tanks/aspire-nautilus/
<!-- [ORBIT SLIDER] -->
<ul data-orbit data-options="navigation_arrows: false; timer: false">
<?php
$priceLinkArray = array();
for($i=0;$i<count($imageArray);$i++) {
if($imageArray[$i]["spp_id"] > 0) {
$priceLinkArray[$imageArray[$i]["spp_id"]] = $i+1;
}
echo '<li data-orbit-slide="headline-'.($imageArray[$i]["spp_id"]).'">';
echo '<img src="'.URL_ROOT.'img/uploads/products/'.$imageArray[$i]["pdi_path"].'" style="margin: auto; max-height: 500px !important">';
echo '</li>';
}
?>
</ul>
<ul class="small-block-grid-2 medium-block-grid-3 large-block-grid-4 product-img-thumb-slider">
<?php
for($i=0;$i<count($imageArray);$i++) {
echo '<li>
<a data-orbit-link="headline-'.($imageArray[$i]["spp_id"]).'">
<img src="'.URL_ROOT.'img/uploads/products/'.$imageArray[$i]["pdi_path_thumb"].'" style="height: 50px; border: 1px solid #eee; margin: auto !important">
</a>
</li>';
}
?>
</ul>
<label><small>Product Package:</small>
<select id="productPriceOption" name="productPriceOption" onchange="updatePrice()">
<?php
for($i=0;$i<count($pricesArray);$i++) {
if($i==0) $currentPrice = $pricesArray[$i]['spp_price'];
if(isset($priceLinkArray[$pricesArray[$i]["spp_id"]])) {
$linkPriceId = $pricesArray[$i]["spp_id"];
} else {
$linkPriceId = 1;
}
echo "<a data-orbit-link='headline-".$pricesArray[$i]['spp_id']."'>
<option data-orbit-link='headline-".$pricesArray[$i]['spp_id']."' value='".$pricesArray[$i]['spp_id']."'>
".$pricesArray[$i]['spp_name']."
</option>
</a>";
}
?>
</select>
</label>
EDIT:::
I have just checked this page using Google Chrome and can see the same problem. It actually is only working for me so far on Windows 10 Internet Explorer. Can anyone help me find an alternative to data-options-link as it's obviously not very good on select boxes...
I have fixed the issue using some Jquery.
I changed the following:
<a data-orbit-link="headline-'.($imageArray[$i]["spp_id"]).'">
To:
<a data-orbit-link="headline-'.($imageArray[$i]["spp_id"]).'" id="headline-'.($imageArray[$i]["spp_id"]).'">
And then used the following Jquery, and applied the method to the Select OnChange (which worked fine as the select option value was sending the spp_id also).
function changeProductImage(value) {
if($('#headline-'+value).length > 0) {
$('#headline-'+value).click();
}}
I hope this helps anyone else. But I would like to leave this post open if possible, in case anyone can provide an solution to Zurb's built in data-orbit-link function on drop down menus.
Related
ion-item clickable event not working in ios but its working fine in android. Please help me, I am wasting my time in & I have searched lot of in google but find any sutaible answer.
<ion-content >
<div>
<ion-searchbar (ionInput)="getItems($event)"></ion-searchbar>
<ion-list lines="full" >
<ion-item class="bg-class" *ngFor="let project of filterData" (click)="onProjectClick(project.npProjCode);">
<ion-icon name="arrow-dropright-circle" style="width: 14px;margin-right: 10px;color: #129bcc;"></ion-icon>
<ion-label>{{project.npProjDescn}}</ion-label>
<ion-icon name="ios-arrow-forward" slot="end" style="color: lightgray;"></ion-icon>
</ion-item>
</ion-list>
</div>
</ion-content>
Got solution, Its work in ios & android
<ion-item button class="bg-class" *ngFor="let project of filterData" (click)="onProjectClick(project.npProjCode);">
-
ion-item[button] {
pointer-events: initial !important;
}
last time I have this problem I fix it like this , hop it work for you
#ViewChild('searchbar', { static: true }) searchbar: IonSearchbar;
ngOnInit() {
this.sub = this.searchbar.ionInput
.subscribe(q => this.getItems(q))
}
template
<ion-searchbar #searchbar ></ion-searchbar>
I have the similar problem, but after login. It was called at background. On Android it worked normally, however, on iOS it did not work at all.
Try to debug if Its not the same problem in .ts
I see this question, which is similar, but looks like no one was able to answer it.
I decided to implement an autocomplete dropdown with the HTML5 datalist, because I have about 1,000 items I'd like mobile users to be able to start typing and narrow the list down. Seems to work great on my Android, but on iOS no options come up at all.
Is this a known issue? I can't seem to find much info on it. I am thinking I will be looking hard for a screen position error (e.g., maybe the options are coming up off to the side of the screen area for some reason), but I'm baffled what else would cause this.
Here's the HTML:
<p>School 1</p>
<input type="text" id="input1" name="school" list="dlSchool1" class="collegeListInput" placeholder="Type a school's name..." />
<datalist id="dlSchool1">
<asp:Repeater ID="rpMobile" runat="server">
<ItemTemplate>
<option value="<%# Eval("SchoolName")%>"><%# Eval("SchoolName")%></option>
</ItemTemplate>
</asp:Repeater>
</datalist>
And some CSS:
.collegeListInput {
width: 225px;
margin-top: 20px;
}
In JQuery I do some stuff on the focusout event.
That's about it. Thanks in advance for any advice / resources. I'm on hour 14 of the workday, so be gentle if this is a really dumb question.
The datalist is not supported on iOS yet (note to visitors from the future, as of Oct 6, 2014 the current version of iOS is 8.0.2).
Can I Use - Datalist
First, sorry becouse I'm just starting with jquery mobile and responsive design.
I'm trying to build a template with jquery mobile for create an mobile app.
The problem is with the mobile and tablets sizes.
My tests don't appear like I want. I want to build something like shows in the image.
http://aprendeinformaticaconmigo.com/images/resposive_app_template.png
Can anyone tell me how do this for different mobile and tablet sizes?
Thanks a lot!!
Like this? http://jsfiddle.net/rnErL/
Very little code for it
CSS:
.box {
max-width:500px;
width:100%;
min-height:200px;
background-color:green;
margin:5px;
margin-left:auto;
margin-right:auto;
}
.bottom-left, .bottom-right {
width:50px;
height:50px;
position:absolute;
background-color:green;
}
.bottom-left {
bottom:5px;
}
.bottom-right {
bottom:5px;
right:5px;
}
HTML:
<div class="box"></div>
<div class="box"></div>
<div class="bottom-left"></div>
<div class="bottom-right"></div>
I have developed an application using Phonegap, jquery jquery-1.6.4 and jquery mobile-1.0.1. Application is working fine on IOS, Android and BlackBerry 10. Now I am trying to port my app for windows 8 phone but $.mobile.changePage("#pageid"); is not working.
My HTML code is:
<div data-role="page" id="emergency_Numbers" class="custom-background-image-college">
<div data-role="header" data-position="fixed" >
<a href="javascript:void(0)" data-role="none" class="custom-button" onclick="goBack()" >Back</a>
<h1>Emergency</h1>
</div>
<div data-role="content" style="padding:5px;">
<ul id="ul_emergency_Numbers" data-role="listview" data-inset="true"></ul>
</div>
</div>
And I am calling from java script :
function displayEmergencyPage() {
var EmregencyNo = "";
EmregencyNo += "<li class='ui-btn ui-bar-f' data-role='list-divider' style='font-size:16px;'>Phone Numbers</li>";
$.each(UIEmergencyObject, function(key, val) {
if(val.enabled == true) {
teleNo = val.number;
EmregencyNo += "<li data-theme='d'><a href='tel:"+teleNo+"' ><label class='modifiedH3text' >"+val.name+"</label><p class='modifiedH4text'>"+val.number+"</p></a></li>";
}
});
$("#ul_emergency_Numbers").html(EmregencyNo);
$.mobile.changePage("#emergency_Numbers");
}
I think there will be some different way to load page in windows 8.
Any help will be appreciated.
I found the solution for this: I changed jquery version to jquery-1.8.2 and jquery mobile version to jquery.mobile-1.3.0 and it worked fine.
$.mobile.changePage as I can recall wont work for jquery 1.6.4,try upgrading jquery and jquery mobile and see if that makes any difference.Thanks
I have a textarea and for some reason when I try to add text in between the open and close brackets of my textarea it wont display, whether I use html content or php echoed content.
It works if I place the content in a place holder though, does anyone know why this is happening?
<form action="includes/changebio.php" method="post" id="form1">
<textarea id="bio" style="width: 440px;
margin-top:3px;
text-align:left;
margin-left:-2px;
height: 120px;
resize: none;
outline:none;
overflow:scroll;
border: #ccc 1px solid;"
textarea name="bio" data-id="bio"
maxlength="710"
placeholder="<?php echo stripslashes($profile['bio']); ?>" rows="10">
</textarea>
<input type="image" src="assets/img/icons/save-edit.png"
class="bio-submit" name="submit" value="submit" id="submit"/>
</form>
Try adding a name="textarea-name"attribute to the textarea (even if you have no use for it)
Edit:
I have tested a <textarea name="bio">textarea content</textarea> piece of code and concluded that (as strange as it may seem), if the textarea name is bio, the content is no shown in Firefox, although it is present if the element is inspected with Firebug or a similar tool.
It appears to be something caused by one of my add-ons, as the textarea content it is displayed correctly by other browsers and when using a clean new Firefox profile.
I have not investigated further though.
Simplest method that worked for me:
Instead of doing:-
<textarea name="scenario" value="<?php echo $scenario?>"> </textarea>
Do it like this:-
<textarea name="scenario"> <?php echo $scenario?> </textarea>
I have similar problem! When I change the content with ajax, Chrome & Firefox displayed nothing, but IE displayed correctly. What strange is the content is present if the element is inspected with Firebug or a similar tool.
You have extra textarea after style tag. Here is the code.
<form action="includes/changebio.php" method="post" id="form1">
<textarea id="bio" style="width: 440px;
margin-top:3px;
text-align:left;
margin-left:-2px;
height: 120px;
resize: none;
outline:none;
overflow:scroll;
border: #ccc 1px solid;" name="bio" data-id="bio" maxlength="710"
placeholder="<?php echo stripslashes($profile['bio']); ?>" rows="10"><?php echo stripslashes($profile['bio']); ?></textarea>
<input type="image" src="assets/img/icons/save-edit.png"class="bio-submit" name="submit" value="submit" id="submit"/>
</form>
I also faced the similar problem and resolved it by doing like this:
{{\App\ArtObject::find($id)->description}}
Earlier I had:
description}}">
The later case did NOT show the value as expected.
If your problem is same as mine, where I placed a string variable with 1500 chars for a web content, between the two tags, and only partial appeared inside the Textarea on the page. Only about 900 chars displayed. A large part at the end were missing. Then, you may try what worked for me, where I used the htmlspecialchars() function like this:
<TEXTAREA><?php echo htmlspecialchars($pgCont); ?></TEXTAREA>
I still don't know why this function may be required to show the full contents of the string variable. Perhaps, for security reasons.