var faq = { "Getting Started with Yomojo": { "Before signing up": { "Yomojo Plans": [ "Each Yomojo Plan consists of a combination of Voice, Text, Data and possibly International calling. Not all plans include an allowance for all usage types. Plans have a 30-day expiry and can be changed any time to suit your needs – any changes will take effect from the start of your next Plan renewal.

VOICE - Includes standard voice calls to national fixed line and any mobile numbers (including Yomojo), 13 numbers and voice mail within Australia. 1800 numbers are free and will not be deducted from your Voice allowance.

2. TEXT - Includes standard national SMS and MMS within Australia.

3. DATA - Includes standard 3G\/4G Data usage within Australia.

4. INTERNATIONAL - Includes standard voice calls to international fixed line and mobile numbers in selected countries. See this link for the included countries: https:\/\/yomojo.com.au\/home\/pricingtable.

" ], "How Much Mobile Data Do You Actually Need?": [ "To help you decide on which mobile plan you need, we have provided some figures to illustrate how much data you might use for some popular apps and services. We suggest that you review the table below in relation to your internet surfing habits and note each person's usage behavior varies.
Service\/App Data Per Hour (except for Skype and Whatsapp) Average Web Browsing Approx. 60MB Messaging Facetime Approx. 85MB Skype Approx. 875KB per minute* Whatsapp Approx. 740.6KB per minute* Social Networks Facebook Approx. 80MB Instagram Approx. 720MB Snapchat Approx. 160MB Media and Streaming Facebook video Approx. 160MB Foxtel Now From 320MB Lossless Music Streaming (Tidal) Approx. 640MB Music Streaming Up to 150MB Netflix From 250MB Online gaming From 3MB Podcasts Approx. 60MB Stan From 570MB YouTube Approx. 300MB." ], "What do I need to join Yomojo?": [ "Valid email address - If you are already a Yomojo customer, just login and you can add new mobile services from your Dashboard.

2. Australian delivery address - We can only send your SIM card to an Australian address. You can choose whether we send to your home address or an alternate, more convenient address such as your workplace.

3. Credit card\/Debit card - Our accepted payment methods at sign-up are credit and debit cards so we can verify your identity for telecommunications compliance purposes. After you have activated, if you wish to pay via cheque or money order you can send this to our office and it will be applied to your account once funds are cleared. Please contact our Customer Service team to arrange this." ], "What SIM card size do I need for my phone?": [ "When you purchase a Yomojo SIM card, you will receive one of our “triple punch” SIM cards. Our triple punch SIM cards cater to all mobile devices so it will be a perfect fit!" ], "What is the difference between Monthly Billing and Prepay?": [ "Prepay - Plans are paid for upfront and ongoing payments are taken on the renewal day of your plan. If you use up your plan inclusions before it expires or wish to use call, text or data services outside of your plan inclusion you will need to top up your Excess Credit. (See: What are Excess Charges and Excess Credit?)

2. Monthly Billing (available to some existing customers only) - You will receive a monthly invoice two (2) days after the end of your billing period. The invoice will detail your Plan charge, any Excess charges plus any additional account credits or charges within the billing period. If you use up any of your inclusions before expiry, your service will not be interrupted. Instead, you will be billed Excess Rates for that specific usage and charges incurred will be on top of your monthly plan charge. Usage not included in your plan will also be charged at Excess Rates (See: What are Excess Charges and Excess Credit?)" ], "Can I use any device with Yomojo?": [ "Our SIM cards are tested to work on mobile phones, tablets (such as iPad's) and WiFi dongles only. Your device must be network unlocked for our SIM card to work. If your device is network locked, contact your device provider to secure an unlocking code. We cannot guarantee that our service will work on Security alarms and other devices not mentioned above." ], "How do I check if my device is network locked?": [ "Please contact your current service provider and provide the IMEI number of your phone so they can check if the device is locked. You may see your phone’s IMEI number by typing this code into your phone: *#06#" ], "Can I bring my number over?": [ "Yes! If you wish to bring your number to Yomojo, during the sign-up process simply tick the ‘I want to bring my mobile number to Yomojo’ option and input the number you want to port and the name of your current provider. (See: Bring My Number over)" ], "Will I be locked in to a contract?": [ "No! There are no lock-in contracts with Yomojo, so you are free to change your plan as you need and you may cancel at any time without penalty (other than breaking our hearts). If you do cancel your service, you will lose any unused allowance at the time of cancellation." ], "Can I use my Yomojo Mobile to call 1900\/premium numbers?": [ "Calling 1900\/premium numbers are blocked. You may text 1900 numbers, but you will have to enable this via SIM Settings on your Dashboard. " ] }, "Ordering a SIM card online (signing up)": { "What do I need to order a SIM card online?": [ "1. Valid email address - If you are already a Yomojo customer, just login and you can add new mobile services from your Dashboard.

2. Australian delivery address - We can only send your SIM card to an Australian address. You can choose whether we send to your home address or an alternate, more convenient address such as your workplace.

3. Credit\/Debit card - Our accepted payment methods at sign-up are credit and debit cards so we can verify your identity for telecommunications compliance purposes. After you have activated, if you wish to pay via cheque or money order you can send this to our office and it will be applied to your account once funds are cleared. Please contact our Customer Service team to arrange this.

" ], "How much does it cost to get my SIM card delivered?": [ "The Yomojo SIM card and delivery included for no additional charge to your monthly plan." ], "How long will it take to get my SIM card?": [ "We use Australia Post’s Priority Post service. Please allow 3-5 business days for your SIM card to be delivered." ], "Can my SIM card be delivered to a different address to my home address?": [ "Yes, as long as the address is a valid Australian address (physical or postal)." ], "What do I do once I receive my SIM card?": [ "Once your SIM has arrived, it will need to be activated to get your service up and running. We will automatically activate your SIM for you (we’ll tell you when) but you can always activate sooner: simply head back onto our website and click 'Activate SIM' or contact us on 1300 YOMOJO (1300 966 656)." ] }, "Bringing My Number Over": { "How long does it take to port?": [ " We submit your port request immediately after you activate your SIM card but we have to wait for your provider to release your number to us - and this is where most of the time is lost! Please allow up to 48 hours for porting to be completed but number porting typically completes the same day (Mon-Sat only)." ], "How will I know when my number has been ported?": [ "You will receive an email from us when your number has been successfully ported. Whilst your number is being ported, simply continue to use your old SIM card - your old service will continue to work until porting has been complete, at which point the network will drop out and you'll know it’s time to swap in your new Yomojo SIM card." ], "Can I port later on?": [ "No, porting is triggered once you click on ‘Activate SIM’. If you want to get a new number instead, you must contact our Customer Support team for their assistance." ], "I received an email\/SMS saying my port is rejected": [ "Don't stress! This simply means that the details you provided do not match those on record with your previous provider. Please log into your Yomojo Dashboard to check if your details are correct - if they are correct you may need to contact your previous carrier to update your details so they match. Our Support Team will be happy to help you through this to make the process as fast as possible and once your details are matching the port will be processed successfully." ] }, "Activating your SIM card": { "How long will it take to activate my service?": [ "Please allow 30 minutes for your service to be fully active after activating your SIM card. If you're porting your number, the porting process will begin as soon as you've activated your SIM card. (See Bringing My Number Over)" ], "How do I change my auto-activation date?": [ "You may alter the activation date through the Yomojo website or by contacting the Customer Service team. However, the activation date can only be deferred up to 45 days into the future." ] }, "Network": { "What Network is Yomojo on?": [ "Yomojo runs on the powerful Optus 3G\/4G Plus Network" ], "Does Yomojo have 4G?": [ "Yes! We have 4G coverage available. It runs on 1800 Mhz, 2100 Mhz and 2300 Mhz frequencies." ], "What is the difference between 3G and 4G?": [ "4G is faster than 3G, which means less buffering, better video quality, enhanced gaming experience and improved streaming services." ], "How do I know if my phone is 4G-capable?": [ "We recommend looking up your device specification by visiting your phone manufacturer’s website. Since it is common for manufacturers to release models with different hardware in different regions, see to it that you are researching on an Australian website. Check if the MHz frequency of your device is able to support 700MHz, 1800MHz, 2100MHz, 2300MHz or 2600MHz. If the answer is yes, then your phone is 4G-capable." ], "How do I know if I am connected to 4G?": [ "Your Signal Bar should indicate 4G." ] } }, "Using your Yomojo Service": { "Plans Validity":{ "Your Plan": [ "1. Your Plan will renew automatically every 30 days.

2. Through your Dashboard or mobile app, you can buy data bolt-ons or use Excess Credit to pay for usage outside of your plan allowance or plan inclusion.

3. Via our Change Plan feature, you can change your Plan whenever you like and as many times as you like. The last saved Plan will be applied on the next scheduled renewal date.

4. The plan allowance does not roll-over month-to-month." ], "What happens if I use up all of a Plan allowance before the expiry?": [ "For prepaid services, you simply won’t be able to use the feature relevant to that allowance. You will need to have – or top-up – your Excess Credit balance if you want to continue using your service.



2. For Monthly Billing services your service will not be interrupted but all usage will be charged on our standard Excess Credit Rates.

3. Excess Rates

11c\/min for voice calls

9c\/160 characters for SMS

5c\/MB for data usage

4. See here for our full list of our Excess Rates: https:\/\/yomojo.com.au\/home\/pricingtable#appendix1" ] }, "How can Bolt-ons help?": { "What are Bolt-ons?": [ "Bolt-ons add data to your existing Data allowance when you need that extra boost. It's much cheaper than the Excess Rate for your additional data." ], "How do I get a Bolt-on?": [ "Your Plan must already include a Data allowance. If so, you can choose to add a 1GB or 2GB data Bolt-on straight from your Dashboard or via the mobile app. If your service is prepaid, we will charge your credit/debit card at the time you add a Bolt-on. If you have a Monthly Billing service, the charge for the Bolt-on will be added to your next monthly bill." ], "When does it expire?": [ "Bolt-ons have the same expiry as your current Plan." ], "What happens if I don’t use my bolt-on?": [ "Since your Bolt-on expires with the rest of your plan, any unused Bolt-on data will also expire. Unused data does not roll over. Charges are non-refundable." ], "What are my bolt-on options?": [ "You can choose to add 1GB for $11 or get 2GB for $20." ], "Is there a limit as to how many bolt-ons I can add?": [ "No, there is no limit. Just remember that bolt-ons have the same expiry as your current plan and any unused bolt-on data will not roll over. Charges are non-refundable." ] }, "What are Excess Charges and Excess Credit? ": { "Excess Charges and Excess Credit": [ "Excess Credit is used to pay for ‘excess’ services not included in your Plan or to pay for usage when you have used up all your Plan allowance for a particular inclusion type. For example, if your Plan does not include any International call minutes, you will need to top-up your Excess Credit to make an international call. If you use all your data allowance before your plan renews, you need to top-up your Excess Credit to keep using data. If you have a Monthly Billing service, you won’t need to top-up but that usage will be charged at our standard Excess Rates.

Excess Rates
11c\/min for voice calls
9c\/160 characters for SMS
5c\/MB for data usage
See here for our full list of our Excess Rates: https:\/\/yomojo.com.au\/home\/pricingtable#appendix1" ], "Excess Credit expiry": [ "Prepaid Excess Credit is valid for 90 days from the time of top-up. Unused credit will be saved as long as you purchase or renew your Plan at least one day before the expiry date. Doing this extends the expiry of your existing credit for another 90 days." ], "Minimum top up": [ "The minimum amount to top-up Excess Credit is $10." ], "Excess Credit Auto Top-up": [ "We will automatically top up your Excess Credit if your balance drops below $2.

2. You may activate\/deactivate the Auto-top up feature by logging into your Dashboard and enabling the setting.

3. You may select the Auto Top-up amount from: $10, $15, $20, $30, $50, $100" ] } }, "Managing your Yomojo Account": { "Setting Up your Plan": { "How do I add\/change my Plan?": [ "1. Log into your Dashboard or mobile app using your email address and password.

2. Click on the 'Change Your Plan' button on the right side of your dashboard.

3. On the 'Change Your Plan' window, move the slider\/s of the pack\/s you want to add or update and click on 'Save Plan & Continue'.

4. You can change your Plan whenever you like. However, any changes made will take effect on the next renewal date or immediately if there is no active Plan at the time of the change.

5. You can make unlimited adjustments to your Plan before the renewal date. The last saved configuration will be applied on the scheduled renewal date." ], /*"How can I disable the auto-renewal of my Plans?": [ "1. Log into your Dashboard by using your email address and password.

2. Click on the 'Choose Your Plan' button on the right side of your Dashboard.

3. On the 'Choose Your Plan' pop-up window, select PAYG and click 'Save and continue'" ],*/ "What happens to my unused credit?": [ "Any unused allowance is lost on the renewal or expiry of your Plan.

" ], "What happens if I have insufficient funds or my payment fails on my renewal date?": [ "For Prepaid - Your Plan will not renew. Your outgoing service will resume once you successfully purchase a new Plan.

2. For Monthly Billing - Your plan will not renew. Note, your usage may be charged at Standard Excess Credit Rates if you do not have an active Plan. Failure to pay your service may result in suspension\/cancellation of your service." ], "Can I update my Plan in the middle of the current Plan cycle?": [ "You can make unlimited adjustments to your Plan however, changes will take effect on the next renewal date. Should you need more data allowance, you may purchase a Data Bolt-on." ], "How do I top-up my Excess Credit? ": [ "1. Log into your Dashboard using your email address and password. 2. Click on the 'TOP UP Now' button on the right side of your dashboard.

3. Move the slider for the desired top up amount. You may top up from $10 - $50, with $1 increments.
4. Once decided on the top up amount, click on 'Confirm and Top up Now' button.
" ] }, "Account Management Portal (dashboard)": { "How can I update my account information?": [ "You may update your account information by logging into your Dashboard and going to Account Settings. You can update the following information:

a. Email Address

b. Billing Address

c. Credit Card Details

d. Account Password " ], "Can I reset my password online?": [ "On the log in page, click on the ‘Forgot Your Password’ link and you will be asked to key in your email address. Password reset instructions will be sent to your email. " ], "How do I view my usage?": [ "You may view your usage by going to the ‘Usage history’ tab through your Dashboard. You may view your usage for the current and the most recent billing period. " ], "How can I check my Excess Credit balance?": [ "Your Excess Credit balance is displayed on the right side of your Dashboard or on the main screen on our mobile app." ], "How do I activate international roaming and other value added services?": [ "To activate international roaming and other added services, please log into your Dashboard or mobile app and see the SIM Settings section. You may manage these features:

a. International Roaming

b. Premium SMS

c. Voicemail

d. Call Waiting

e. Caller ID

f. Call Diverts " ] }, "Other Account related concerns": { "How do I nominate an authorised person on my account?": [ "You simply need to contact our Customer Service team and they can add an authorised person on your account. You need to provide them with the Complete Name and a unique email address of your authorised person. " ], "How can I cancel my Yomojo service?": [ "Please contact our Customer Service team directly via Email, Live chat or by calling our hotline." ], "Can I have multiple services (SIM cards) under one account?": [ "Yes, you can add additional services to your account via the Dashboard. Use the 'Add Service' link in the top right corner of your Dashboard to purchase an additional service to add to your account. You may be eligible to receive our Family Bundle discount! If you require any assistance, please contact our Customer Service Team." ], "Does it cost anything to change the ownership of my account?": [ "No. Requesting for a change of ownership is FREE however you will need to complete this form as part of your request." ], "What does it cost to change my mobile number?": [ "Changing a mobile number costs $20 per event. " ], "Can I get a Premium number?": [ "Yes you may. This option requires a small fee upon request. Premium number fee is $30 per number." ] } }, "Basic Troubleshooting": { "Internet & MMS Set up for Mobile Phones": { "iPhone Troubleshooting\/Facetime and iMessage Activation": [ "Your iPhone should automatically update its carrier settings for Yomojo. Just insert the SIM card, connect your phone to iTunes and sync your device to download the carrier settings. Make sure you back-up your phone first so you don't lose anything important.

If you need to set up your iPhone manually, simply follow these steps:

1. Tap Settings

2. Tap General

3. Tap Reset

4. Tap Reset Network Settings

5. Re-sync w\/ iTunes*

*Make sure you back-up your phone first so you don't lose anything important.

iMessage Activation

1. Tap Settings

2. Tap Messages

3. Tap iMessage slider to ON

Note: You will need at least 35c of Pay As You Go credit to activate iMessage as your iPhone sends an automatic SMS to Apple servers. Activation will complete within 24 hours.

Facetime Activation

a. Tap Settings

b. Tap Facetime

c. Tap Facetime slider to ON" ], "Setting up Internet for my Android Device": [ "Below is a guide for configuring internet settings on your Android mobile device. As there are different versions of the Android Operating Systems and devices in the market, we have come up with some basic steps required to get you up and running with the internet.

Here's the Android APN Settings for your phone:

1. Press Menu

2. Tap New APN

3. Tap Name and enter Yomojo and tap OK

4. Tap APN and enter yesinternet and tap OK

5. Ensure Proxy is NOT set

6. Ensure Port is NOT set

7. Ensure Username is NOT set

8. Ensure Password is NOT set

9. Ensure Server is NOT set

10. Ensure MMSC is NOT set

11. Ensure MMS Proxy is NOT set

12. Ensure MMS Port is NOT set

13. MCC is 505

14. MNC is 02

15. Authentication Type is PAP

16. APN Type is default or internet

17. APN protocol: IPv4

18. Enable \/ Disable APN: Box ticked

19. Bearer is unspecified

20. Press Menu and hit SAVE

21. Tap Yomojo and make sure it has a green\/blue dot indicator next to it

22. Enable Mobile networks

23. Restart phone and check if you can connect" ] }, "Internet set up for tablets\/mobile broadband": { "Setting up internet for my iPad": [ "Here's how you can set up the APN on your iPad:

1. Select Settings

2. Select Cellular Data tab

3. Select APN Settings

4. APN is yesinternet

5. Username is null

6. Password is null

\u2022 Packet Data

1. Select Settings

2. Tap Cellular Data Tab

3. Select Cellular Data to enable \/ disable" ], "Setting up internet for my Pocket Wifi\/USB dongle": [ "There are many different devices which will enable you to create a WIFI hotspot for use with your Yomojo data. Below are a set of generic settings which you can use to configure your device. If you need more detailed instructions, please refer to the manufacturer's documentation (manual).

Generic Settings

1. Open Tools \/ Options

2. Click New \/ New Profile

3. Set Profile name to Yomojo

4. Click 'Static' radio button

5. Enter yesinternet in the APN field

6. Enter *99# in the access number field

7. Select CHAP if asked for authentication type

8. Username field is BLANK

9. Password field is BLANK

10. Click Save

11. Click Set as Default

12. Click OK

13. Test if internet works" ] }, "Phone Calls": { "I cannot make outbound calls": [ "\u2022 Make sure you have not used up your Voice allowance

\u2022 Check if you have reception on your mobile device by looking next to the operator logo.

\u2022 Restart your phone and make sure that the number you are dialing is correct.

\u2022 Note down the error message and contact our Customer Service team after the above steps have been completed and you're still unable to make outbound calls. " ], "I cannot receive incoming calls": [ "\u2022 Check if you have reception on your mobile device by looking next to the operator logo.

\u2022 Restart your phone and test if you can make outbound calls.

\u2022 Ensure diversion is NOT set to Unconditional.

\u2022 Contact our Customer Service team if you're still unable to receive calls after completing the above. " ], "I can't make international calls": [ "\u2022 Maybe you used up your allowance? Make sure you have Excess Credit.

\u2022 If you have an international allowance, ensure the country you're calling is included in the countries we provide international access.

\u2022 Ensure you're using the correct area code when dialing: 0011 + country code + mobile\/phone number (minus the leading 0).

\u2022 Note down the error message and contact our Customer Service team after the above steps have been completed and you're still unable to make international calls. " ] }, "SMS": { "I cannot send SMS": [ "\u2022 Have you used up the Text allowance included in your plan?

\u2022 Check if you have reception on your mobile device by looking next to the operator logo.

\u2022 Are you able to make outgoing calls?

\u2022 Make Sure SMSC on your phone is set to: +61411990001.

\u2022 Restart phone and send a test SMS to your own number.

\u2022 Note down the error message and contact our Customer Service team if you're still unable to send SMS after checking these steps. " ], "I cannot receive SMS": [ "\u2022 Check if you have reception on your mobile device by looking next to the operator logo.

\u2022 Are you receiving phone calls?

\u2022 Ensure your inbox is NOT FULL.

\u2022 Restart your phone, take the SIM card out and put it back in after a minute and send a test SMS to your own number so you can check if you can receive messages.

\u2022 Contact our Customer Service team if you're still unable to receive SMS after completing these steps. " ], "MMS Settings": [ "1. Press Apps (grid icon)

2. Select Settings

3. Select Connections tab (along the top)

4. Select More networks

5. Select Mobile networks

6. Select Access Point Names

7. Press Menu (left soft key)

8. Select New APN

9. Enter Name: Yomojo MMS

10. Enter APN: mms

11. Leave Proxy blank

12. Leave Port blank

13. Leave Username blank

14. Leave Password blank

15. Leave Server blank

16. Enter MMSC: http:\/\/mmsc.optus.com.au:8002\/

17. Enter MMS proxy: 61.88.190.10

18. Enter MMS port: 8070

19. Select MMS protocol: WAP 2.0

20. Enter MCC: 505

21. Enter MNC: 02

22. Leave Authentication type: blank

23. Enter APN type: mms

24. Select Bearer: Unspecified

25. Press Menu (left soft key)

26. Select Save " ] }, "Voicemail Troubleshooting": { "How do I set up Voicemail?": [ "You may set up voicemail by dialing 321 from your mobile phone (with the Yomojo SIM card). You will need to complete the voicemail tutorial and you will be asked to set up your recording and greeting. Note that if the tutorial isn’t completed, progress won’t be saved and you will need to restart the tutorial to set up your voicemail." ], "How do I access my voicemail message bank?": [ "Easy! Just dial 321 on your mobile phone and you’ll be able to access your message bank." ], "How much does voicemail cost?": [ "If you have a Voice allowance, your voicemail calls are included and will be charged on per minute blocking." ], "Can I access my voicemail from an Australian landline or another mobile?": [ "Yes! You certainly can. You need to dial 133321 or 0411000321. You will be asked to enter your mobile number and the voicemail PIN you set up. Note that standard carrier charges apply when using this option." ], "Where can I change my call diversion settings?": [ "You can update your diversion settings\/ring time by logging into your Dashboard or mobile app and going to the SIM Settings. Alternatively, you may use these codes on your phone:

1. Dial this code: **61*321**XX#

2. Replace 'XX' with the ring length in seconds. The ring time can be set in increments of 5 seconds to a maximum of 30 seconds. (Eg. 05, 10, 15, 20, 25, 30.)

3. Press Call or Send (as if making a call) " ] } } }; $(function(){ $("#search-faq").on("keyup",function(e){ if($(this).val() == "") { $("#faq-content").show(); $(".search-result-title,.search-results-container").hide(); $(".search-result-title span.result").text(""); $("ul.search-paginate").empty().hide(); setTimeout(function(){ var topPX = $("section#faq").outerHeight(true) + $("section.plans").outerHeight(true) + $("header.menuplans").outerHeight(true) console.log($("section#faq").outerHeight(true) + "|" + $("section.plans").outerHeight(true) + "|" + $("header.menuplans").outerHeight(true)); $("footer.footer-pages").css({ 'top' : topPX }); },500); window.location.hash = ""; }else{ var results = []; window.assoc = []; var q = 0; var term = $("#search-faq").val(); if(term.length < 3) { $(".search-result-title").show(); $(".search-result-title span.result").text("Search string must be at least 3 characters in length"); $(".search-results-container").hide(); $("#faq-content").hide(); $("ul.search-paginate").empty().hide(); window.location.hash = ""; setTimeout(function(){ var topPX = $("section#faq").outerHeight(true) + $("section.plans").outerHeight(true) + $("header.menuplans").outerHeight(true) console.log($("section#faq").outerHeight(true) + "|" + $("section.plans").outerHeight(true) + "|" + $("header.menuplans").outerHeight(true)); $("footer.footer-pages").css({ 'top' : topPX }); },500); return; } if($.trim(term) != "" && term.length > 2) { $("#faq-content").hide(); $(".search-result-title").show(); $.each(faq,function(maintitle,j){ /*if(maintitle.replace(/\d\.+/g,"").toLowerCase().indexOf(term.toLowerCase()) != -1)*/ if(maintitle.replace(/\d\.+/g,"").toLowerCase().indexOf(term.toLowerCase()) != -1) { window.assoc.push({ title : JSON.stringify(maintitle), content : JSON.stringify(maintitle) }); }else{ $.each(faq[maintitle],function(maincategory,k){ if(maincategory.toLowerCase().indexOf(term.toLowerCase()) != -1) { window.assoc.push({ title : JSON.stringify(maintitle.replace(/\d\.+/g,"") ), content : JSON.stringify(maincategory) }); } $.each(faq[maintitle][maincategory],function(subcat,l){ if(subcat.toLowerCase().indexOf(term.toLowerCase()) != -1) { window.assoc.push({ title : JSON.stringify(maintitle.replace(/\d\.+/g,"") + " | " + maincategory ), content : JSON.stringify(subcat) }); } var articles = faq[maintitle][maincategory][subcat]; $.each(articles,function(content,m){ var answer = JSON.stringify(articles[content]); if(answer.toLowerCase().indexOf(term.toLowerCase()) != -1) { window.assoc.push({ title : JSON.stringify(maintitle.replace(/\d\.+/g,"") + " | " + maincategory + " | " + subcat), content : JSON.stringify(answer)}); } }); }); }); } }); if(window.assoc.length > 0) { window.location.hash = "#page=1"; // show pagination var paginatedAssoc = window.assoc.slice(0,5); setTimeout(function(){ var noOfPages = Math.ceil(assoc.length / 5); console.log(noOfPages); var pageTemplate = ""; if(window.location.hash.indexOf("page=") != -1) { var pageNo = window.location.hash.split("="); var pageHash = pageNo[1]; } for(var p = 1; p <= noOfPages; p++) { if(pageHash == p) { pageTemplate += "
  • " + p + "
  • "; }else{ pageTemplate += "
  • " + p + "
  • "; } } if(noOfPages > 1) { $("ul.search-paginate").html(pageTemplate).show(); }else{ $("ul.search-paginate").empty().hide(); } },500); var res = ((window.assoc.length > 1) ? " topics" : " topic"); $(".search-result-title span.result").text("Search results for: `" + term + "` : Showing " + window.assoc.length + res); var searchResults = ""; //var j = 1; $.each(paginatedAssoc,function(i,v){ var link = $.trim(v.title.split("\"").join("")).replace(/\s/g,"+").replace(/\+\+\+\+/g,"+"); searchResults += "" + "" + "" + JSON.parse(v.title) + ""; var re = new RegExp(term,"gi"); searchResults += "

    " + JSON.parse(v.content).replace(re, "" + term + "").split("\"").join("") + "

    "; //j=j+1; }); $(".search-results-container").show().html(searchResults); setTimeout(function(){ var topPX = $("section#faq").outerHeight(true) + $("section.plans").outerHeight(true) + $("header.menuplans").outerHeight(true) console.log($("section#faq").outerHeight(true) + "|" + $("section.plans").outerHeight(true) + "|" + $("header.menuplans").outerHeight(true)); $("footer.footer-pages").css({ 'top' : topPX }); },500); }else{ $(".search-result-title span.result").text("No results found for: `" + term + "`"); $(".search-results-container").hide(); $("ul.search-paginate").empty().hide(); } } } if(e.keyCode == 46) { $("ul.search-paginate").empty().hide(); } }); $("body").on("click","ul.search-paginate li a",function(){ $("ul.search-paginate li").removeClass("active"); $(this).parent().addClass("active"); var page = $(this).attr("href"); var offset = page.split("="); var limit = 5; // show pagination var paginatedAssoc = window.assoc.slice((limit * parseInt(offset[1]) - limit),limit * parseInt(offset[1])); var searchResults = ""; //var j = 1; var term = $("#search-faq").val(); $.each(paginatedAssoc,function(i,v){ var link = $.trim(v.title.split("\"").join("")).replace(/\s/g,"+").replace(/\+\+\+\+/g,"+"); searchResults += "" + "" + "" + JSON.parse(v.title) + ""; var re = new RegExp(term,"gi"); searchResults += "

    " + JSON.parse(v.content).replace(re, "" + term + "").split("\"").join("") + "

    "; //j=j+1; }); $(".search-results-container").empty().html(searchResults).show(); setTimeout(function(){ var topPX = $("section#faq").outerHeight(true) + $("section.plans").outerHeight(true) + $("header.menuplans").outerHeight(true) $("footer.footer-pages").css({ 'top' : topPX }); },250); }); });