Demonstrates how to use session storage to know which site page a site visitor previously visited. The code needs to be placed in the Site tab so that it runs on all of the site's pages. The code retrieves the URL of the page a visitor previously visited from session storage. It then stores the URL of the visitor's current page in session storage. When the visitor navigates to another page, this stored URL is retrieved as the previous page URL.
The original example Countdown site displays the countdown till a certain date and time. When the countdown reaches that moment, it begins the countdown for how long the awaited event lasts. After the event is over, the app then begins counting up to show how much time has elapsed since the event.
This example Countdown site displays the countdown till I reach retirement age (67, a prime number) on Feb 15th. Wix Code is amazing, and I'm not going anywhere! So, on Sunday (the 17th) I’ll be back in the office as usual... forums, support, and examples.
This is a fun example written by my friend and colleague Majd Qumseya. Majd cleverly uses a show/hide spin effect to "spin the wheel". Behind the scenes, he randomizes the list of available prizes. The coupon code is displayed when the wheel stops spinning.
Page through the dynamic pages using a Next button. When there are no more pages, then go back to the beginning. Works the same for the Previous button, when there are no more previous pages, go to the last page.
Demonstrates an online polling system for logged in users, thus allowing only one vote per user. Shows the results with an options for showing results even if the user hasn't voted yet. Also has an option for allowing/preventing the user from changing their vote.
The example template also has a very basic (and incomplete) admin functionality allowing for creating and editing polls.
Lightbox, Repeater, backend, user input, wix-data, wix-users-backend
Shows how to display if a business is currently "open for business". Gets the visitor's current date and time, checks if the business is currently open according to the configured business hours, and displays the current status. Also displays the business hours and highlights the current day's hours.
This example allows registered users to rate recipes when logged in. The user can only submit one rating, but can change it. The list of recipes is displayed on the Home page in a Repeater, which also displays the current rating for each recipe. Clicking a Repeater item opens a Lightbox displaying the recipe and allows the user to give or change a rating.
This example demonstrates how to implement an autosuggest dropdown by using a Repeater with keyboard navigation. Use up/down arrows to make your selection, and the Enter key to accept the selected entry. The selection can also be made using the mouse/trackpad as usual.
This example implements a wholesale pricing mechanism for Wix Stores. A wholesale database collection contains a link to the products in the Stores/Products collection, and the wholesale price of the product. All database queries and updates are in backend code which provdes a high level of data security.
The Admin Products page allows the site owner/admin to enter or edit the wholesale prices of the products. This page is accessible to Dealers and site Admins.
The Dealer Products page displays the wholesale prices of the products. This page is only available to Dealers.