I am following Stripe's JS implementation of Apple Pay on the Web (https://stripe.com/docs/stripe-js/elements/payment-request-button). It uses an element with an id of #payment-request-button and Stripe loads the button in an iFrame so that it remains PCI compliant. The button is loaded in the iFrame at 40px height and black background.
Looking at Apple Pay's own documentation, there are a few button options and button styling options ( https://applepaydemo.apple.com/#display-button ), as well as text such as "Checkout with Apple Pay" or "Pay with Apple Pay".
Is there a way to apply these text options and custom heights to the Stripe implementation?
You can style the iFramed button with the pre-built theme's as shown here: https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-styling-the-element
Alternatively, you are able to create and style your own button, then call paymentRequest.show() to trigger the payment sheets: https://stripe.com/docs/js/payment_request/show
Related
I am editing a site in wordpress acting on custom css. I would need to have a black background on the main page where all the products are displayed and keep the white background inside the product sheet.
currently I have entered this code:
.site-container {
position:relative;
background:black;
}
this code worked in the main product grid, now the background is black, the problem is that it also changed the background of the single product page. how do i exclude the command to make it stay only on the product grid?
or alternatively which code should I enter to make the product sheet background white?
(the site I'm working on is not online yet)
thank you
Just add the background property to the page ID class for the page you want to change the background.
So for example your page ID is 6:
.page-id-6 {
background:black;
}
This css is only applied to the page with the ID 6.
You can find the id with the dev tools of your browser, just have a look at the classes of the HTML Body.
How to change the background colour of the top header bar (where the transparent brand logo seats) of story/article pages, in Apple News ?
Couldn't find at configuration in iCloud News Publisher > Settings > Branding
Does the brand need to be registered at https://register.apple.com/business/ui ?
Tried following via article.json, but didn't work
"documentStyle": {
"backgroundColor": "#F8F8F8"
}
The color of that bar cannot be changed in code or in iCloud News Publisher. If you have a publisher representative at Apple, you can work with them to customize the color of that bar.
How do I turn off or hide the "More Options" item in the Azure Media Player controls menu?
I still need the other controls, so disabling the entire control bar is not an option.
Currently Azure Media Player does not have any API to turn off the more options menu as it is used to house the buttons when the control bar is too small to correctly display this.
You can however hide this button with some simple CSS:
<style>
.amp-moreoptions-control{
display:none;
}
</style>
You can also add new ideas or requests for Azure Media Player here:
http://feedback.azure.com/forums/293565-azure-media-player
Pass a custom plugins > controlBarIcons object on the amp consturctor options works well too, like:
plugins: {
controlBarIcons: {
leftIcons: ["playToggle", "previousTrackButton", "skipBackwardButton", "rewindButton", "fastForwardButton", "skipForwardButton", "nextTrackButton", "playbackSpeedButton", "liveDisplay"],
middleIcons: ["liveIndicator", "currentTimeDisplay", "timeDivider", "durationDisplay", "volumeMenuButton"],
rightIcons: ["shareButton", "castToDeviceButton", "audioTracksButton", "subtitlesButton", "captionsButton", /*"qualityButton",*/ /*"moreOptionsButton",*/ "fullscreenToggle"],
removeOtherIcons: ["qualityButton", "moreOptionsButton"]
},
}
You must put the icons that u don't want to be displayed on the "removeOtherIcons", futhermore this allow you to change the order or or move the icons to other bars.
I am considering buying the pro version of this plugin, but I want to confirm that I would be able to create a text link , such as "CLICK HERE" that will trigger a lightbox slider show to pop up. Can this plugin does this easily?
There are a LOT of light box plugins and code snips, so it is tough to say, but you should be able to utilize some jQuery javascript to manipulate the click event to do what you desire to do. You could make a div area to hide until needed to show the lightbox, if needed, or just inject it into the body of the document...
<script>
$('popupDiv').hide();
var lightboxCode = '<span>Whatever code your plugin uses to display here</span>';
$('#showButton').click( function() {
$('popupDiv').html(lightboxcode);
$('popupDiv').show();
});
</script>
I need to build a custom designed bar chart that displays some simple data. Below are my requirements. Can anyone suggest the best web technology for my requirements.
high browser compatibility
ability to draw shapes
ability to fill shapes with gradients
ability to have onclick and onmouseover events for the different shapes (bars in the chart).
Thanks guys. I was thinking of using svg but looking for suggestions.
How about Raphaël - it's SVG/VML.
It says:
Browser compatibility:
Raphaël currently supports Firefox
3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.
Ability to draw shapes
circle, rect, ellipse, image, text, path
Ability to fill shapes with gradients
yes
Ability to have onclick and onmouseover events
yes:
... every graphical object you
create is also a DOM object, so you
can attach JavaScript event handlers
or modify them later.
Everything in the reference
On top of that, there's a plugin called gRaphael which makes the creation of charts easier.
Simple data - Google Charts API or Google Visualization API may suit you.
Details for all features of image charts can be found on the Chart feature list
You may also take a look at the comparison of the Charts API and the Visualization API.
Another candidate of course is JQuery SVG - if you're already familiar with jquery you may prefer this one.
There's a comparison of JQuery SVG and Raphaël on SO:
jQuery SVG vs. Raphael
I recommend using Adobe Flex. Below is an example of how easy pie chart creation can be in Flex:
<mx:Panel title="Pie Chart">
<mx:PieChart id="myChart"
dataProvider="{expenses}"
showDataTips="true"
>
<mx:series>
<mx:PieSeries
field="Amount"
nameField="Expense"
labelPosition="callout"
/>
</mx:series>
</mx:PieChart>
<mx:Legend dataProvider="{myChart}"/>
Based on your criteria:
high browser compatibility: Flex is used on more than 95% of all browsers and behaves the same in all browsers. No more need to check if your web app is running in ie, firefox, chrome, etc... because any browser that has a flash player is compatible.
ability to draw shapes: Flash's greatest strength is the ability to draw. Charts are completely customizable and skinnable to achieve the look you need.
Ability to fill shapes with gradients - done easily by setting style attributes or a custom skin.
ability to have onclick and onmouseover events for the different shapes - see this link for some easy ways to create user interactions with charts.
Hi i hope this link may help you i found it while searching for a solution similar to what you're looking for:
http://www.artetics.com/Articles/using-various-javascript-libraries-to-create-pie-chart
i'm trying gRaphael, i'm having difficulties on finding documentation though. you have to read the code and use the exploded instead of the min.js
I would like to share jquery.jqplot.js. It has lots of jQuery options, but depends on other plugins such as syntaxhighliter etc.