5 Common Causes of Bloating and How to Relieve It

Imagine enjoying a delicious meal with your loved ones, only to be met with an uncomfortable, bloated feeling afterwards. We’ve all been there, and it’s not a pleasant experience. But fear not! In this article, we will explore the five most common causes of bloating and provide you with simple yet effective ways to relieve it. Get ready to bid farewell to that pesky bloated feeling and embrace a happy, healthy digestive system.

5 Common Causes of Bloating and How to Relieve It

Digestive Disorders

Gastrointestinal Infections

Gastrointestinal infections, also known as stomach bugs or stomach flu, are a common cause of digestive discomfort and bloating. These infections are usually caused by bacteria, viruses, or parasites that enter your digestive system through contaminated food or water. Symptoms of gastrointestinal infections may include bloating, diarrhea, nausea, vomiting, and abdominal pain. To relieve the symptoms of gastrointestinal infections, it is important to stay hydrated and get plenty of rest. In some cases, antibiotics may be prescribed to treat bacterial infections.

Irritable Bowel Syndrome

Irritable Bowel Syndrome (IBS) is a chronic condition that affects the large intestine. It is characterized by symptoms such as abdominal pain, bloating, diarrhea, and constipation. The exact cause of IBS is not known, but it is believed to be related to a combination of factors such as abnormal muscle contractions in the intestines, heightened sensitivity to pain, and changes in the gut microbiota. Managing IBS usually involves making lifestyle changes such as avoiding trigger foods, reducing stress, and getting regular exercise. In some cases, medications may be prescribed to alleviate symptoms.

Celiac Disease

Celiac disease is a genetic autoimmune disorder that affects the small intestine. It is triggered by the ingestion of gluten, a protein found in wheat, barley, and rye. When people with celiac disease consume gluten, their immune system responds by damaging the lining of the small intestine. This can lead to a variety of symptoms, including bloating, diarrhea, abdominal pain, and weight loss. The only treatment for celiac disease is a strict gluten-free diet, which involves avoiding all sources of gluten.

Crohn’s Disease

Crohn’s disease is a type of inflammatory bowel disease (IBD) that can affect any part of the digestive tract, from the mouth to the anus. It is characterized by chronic inflammation and can cause symptoms such as abdominal pain, diarrhea, bloody stools, and bloating. The exact cause of Crohn’s disease is unknown, but it is believed to involve a combination of genetic, environmental, and immune system factors. Treatment for Crohn’s disease may include medications to reduce inflammation, dietary changes, and in some cases, surgery.

Ulcerative Colitis

Ulcerative colitis is another form of inflammatory bowel disease that primarily affects the colon and rectum. It is characterized by inflammation and ulcers in the lining of the colon, which can lead to symptoms such as abdominal pain, bloody diarrhea, and bloating. The exact cause of ulcerative colitis is unknown, but it is thought to be related to a combination of genetic, environmental, and immune system factors. Treatment for ulcerative colitis may include medications to reduce inflammation, dietary modifications, and surgery in severe cases.

Food Intolerances

Lactose Intolerance

Lactose intolerance is a common food intolerance that affects the ability to digest lactose, the sugar found in milk and dairy products. People with lactose intolerance lack the enzyme lactase, which is needed to break down lactose in the small intestine. When lactose is not properly digested, it can cause symptoms such as bloating, diarrhea, and abdominal pain. Managing lactose intolerance usually involves avoiding or limiting the consumption of lactose-containing foods and beverages. Lactase supplements may also be taken to help digest lactose.

Fructose Intolerance

Fructose intolerance, also known as fructose malabsorption, is a condition where the body has difficulty absorbing fructose, a type of sugar found in many fruits, vegetables, and processed foods. When fructose is not properly absorbed in the small intestine, it can ferment in the colon, leading to symptoms such as bloating, gas, and diarrhea. To manage fructose intolerance, it is important to identify and avoid foods high in fructose. A low-FODMAP diet may be recommended to help alleviate symptoms.

Gluten Intolerance

Gluten intolerance, also known as non-celiac gluten sensitivity, is a condition where individuals experience symptoms similar to those with celiac disease when consuming gluten-containing foods. However, unlike celiac disease, gluten intolerance does not cause the same immune system response and damage to the small intestine. Symptoms of gluten intolerance may include bloating, abdominal pain, diarrhea, and fatigue. The only treatment for gluten intolerance is to follow a gluten-free diet and avoid foods that contain gluten.

Histamine Intolerance

Histamine intolerance is a condition that occurs when the body has difficulty breaking down histamine, a compound involved in immune responses and found in many foods. When histamine levels become too high in the body, it can lead to symptoms such as bloating, headaches, skin rashes, and digestive issues. Managing histamine intolerance usually involves avoiding or minimizing the consumption of foods that are high in histamine, such as certain types of fish, aged cheeses, and fermented foods.

Sorbitol Intolerance

Sorbitol intolerance is a condition where the body has difficulty digesting sorbitol, a sugar alcohol found naturally in many fruits and used as a sweetener in some processed foods. When sorbitol is not properly digested in the small intestine, it can ferment in the colon and cause symptoms such as bloating, gas, and diarrhea. Avoiding foods and beverages high in sorbitol is the primary way to manage sorbitol intolerance. Reading food labels carefully and choosing alternative sweeteners may be necessary.

5 Common Causes of Bloating and How to Relieve It

Excessive Swallowing of Air

Eating or Drinking Too Quickly

Eating or drinking too quickly can cause you to swallow air, leading to bloating and discomfort. When you eat or drink rapidly, you may not chew your food properly, and this can lead to the intake of excess air. To reduce bloating caused by eating or drinking too quickly, try to slow down and take smaller bites or sips. Chewing your food thoroughly and taking breaks between bites can also help prevent excessive air swallowing.

Chewing Gum

While chewing gum can freshen your breath and help curb cravings, it can also contribute to bloating. When you chew gum, you tend to swallow more frequently, which can result in the ingestion of excess air. The artificial sweeteners used in sugar-free gum can also cause bloating and digestive issues in some individuals. If you experience bloating after chewing gum, consider cutting back or finding alternative ways to freshen your breath.


In addition to its harmful effects on overall health, smoking can also contribute to bloating and digestive discomfort. When you smoke, you inhale and swallow air, which can accumulate in your digestive system and cause bloating. Smoking can also irritate the lining of the stomach, leading to increased production of stomach acid and aggravating digestive symptoms. Quitting smoking not only improves overall health but may also help reduce bloating and other digestive issues.

Drinking Carbonated Beverages

Carbonated beverages, such as soda and sparkling water, can cause bloating due to the carbon dioxide gas they contain. When you consume carbonated drinks, the gas is released in your stomach, leading to the sensation of bloating. To reduce bloating caused by carbonated beverages, try opting for still water or herbal tea instead. If you enjoy the fizziness of carbonated drinks, consider letting them go flat before consuming them.

Using a Straw

Using a straw to drink beverages can lead to increased air intake, resulting in bloating and gas. With each sip, you may inadvertently swallow air along with the liquid. To reduce the risk of bloating, try drinking directly from a cup or glass rather than using a straw. This simple change can help minimize the amount of air you swallow and alleviate bloating caused by excessive air in your digestive system.

Overeating or Eating Large Meals

Eating Too Much Too Quickly

Consuming large quantities of food in a short period can lead to bloating and discomfort. When you eat too much too quickly, your stomach may become overly stretched, causing feelings of fullness and bloating. To prevent bloating from overeating, it is important to practice portion control and eat slowly. Paying attention to your body’s hunger and fullness cues can help you avoid eating past the point of feeling comfortably satisfied.

Consuming Gas-Producing Foods

Certain foods are known to produce gas when digested, leading to bloating and flatulence. Some common gas-producing foods include beans, lentils, broccoli, cabbage, onions, and carbonated beverages. While these foods are nutritious, individuals who are prone to bloating may need to limit their intake or find ways to reduce gas production. Cooking gas-producing foods thoroughly or taking over-the-counter enzyme supplements may help alleviate bloating.

Eating High-Fat Foods

Foods that are high in fat can take longer to digest, leading to feelings of bloating and discomfort. Fatty foods can slow down the emptying of the stomach and cause a delay in the passage of food through the digestive system. To reduce bloating caused by high-fat foods, try opting for leaner protein sources, choosing healthier fats such as avocado or olive oil, and incorporating more fiber-rich foods into your diet. It is also important to practice moderation when consuming high-fat foods.

Eating Too Much Fiber

While fiber is important for digestive health, consuming excessive amounts of fiber can lead to bloating and gas. Fiber adds bulk to the stool and can promote regular bowel movements, but if your body is not accustomed to a high-fiber diet, it may cause digestive issues. To prevent bloating from excessive fiber intake, gradually increase your fiber intake over time and drink plenty of water. This can help your body adjust to the increased fiber and reduce the risk of bloating.

Drinking with Meals

Drinking large quantities of fluids, especially carbonated or sugary beverages, while eating can contribute to bloating. When you consume excessive liquids with a meal, it can dilute the stomach acid and slow down digestion, leading to bloating and discomfort. To prevent bloating caused by drinking with meals, try to limit the amount of fluid you consume during mealtime. It is also important to avoid drinking large amounts of liquid immediately before or after a meal.

5 Common Causes of Bloating and How to Relieve It

Hormonal Changes


Many women experience bloating and water retention in the days leading up to their menstrual period. These hormonal changes can cause fluid retention and bloating in the abdominal area. Some women may also experience constipation or diarrhea during their menstrual cycle. To help alleviate bloating during menstruation, it can be helpful to stay hydrated, consume a balanced diet, and engage in regular physical activity. Over-the-counter pain relievers or herbal remedies may also offer some relief.


During pregnancy, hormonal changes and the growing uterus can lead to bloating and discomfort. The increased levels of progesterone can cause relaxation of the muscles in the digestive tract, which can slow down digestion and lead to bloating and gas. Eating smaller, more frequent meals, avoiding greasy or spicy foods, and staying active can help alleviate bloating during pregnancy. It is important to consult with a healthcare provider before taking any medications or supplements during pregnancy.


Menopause is a natural stage in a woman’s life that marks the end of her reproductive years. Hormonal changes during menopause can cause bloating and weight gain, particularly around the abdominal area. The decrease in estrogen levels can affect the body’s metabolism and lead to changes in body composition. Managing bloating during menopause may involve maintaining a healthy lifestyle, including regular exercise, a balanced diet, and stress reduction techniques.

Hormonal Medications

Certain hormonal medications, such as birth control pills or hormone replacement therapy, can cause bloating and fluid retention as side effects. These medications can affect fluid balance in the body and lead to bloating in some individuals. If you experience bloating while taking hormonal medications, it is important to discuss your symptoms with a healthcare provider. They may be able to adjust your dosage or recommend alternative medications that do not cause bloating.

Fluid Retention

Fluid retention, also known as edema, can occur due to various factors, including hormonal changes, certain medications, and underlying medical conditions. When excess fluid accumulates in the body, it can lead to bloating and swelling in different areas, such as the abdomen, hands, or feet. To reduce fluid retention and bloating, it is important to maintain a balanced diet, limit sodium intake, stay hydrated, and engage in regular physical activity. If you suspect that fluid retention is causing your bloating, it is essential to consult a healthcare professional for an accurate diagnosis and appropriate treatment.

Fluid Imbalance


Dehydration occurs when the body does not have enough water to function properly. When you are dehydrated, your body may retain water in an attempt to prevent further fluid loss. This can lead to bloating and water retention. To prevent dehydration and bloating, it is crucial to drink an adequate amount of water throughout the day. The exact amount of water needed varies depending on factors such as age, activity level, and overall health. It is important to listen to your body’s thirst cues and drink water regularly.

Excess Sodium Intake

Consuming excessive amounts of sodium, commonly found in processed foods, can lead to water retention and bloating. Sodium attracts and retains water in the body, causing bloating and puffiness. To reduce bloating from excess sodium intake, it is important to read food labels carefully, limit the consumption of processed foods, and opt for fresh, whole foods instead. Cooking at home using herbs and spices for flavor instead of relying on salt can also help reduce sodium intake.

Excess Alcohol Consumption

Alcohol can cause dehydration and lead to fluid imbalances in the body. When you consume alcohol, it acts as a diuretic, increasing urine production and potentially causing dehydration. In response to dehydration, the body may retain water, leading to bloating and water retention. To reduce bloating from excess alcohol consumption, it is important to drink alcohol in moderation and alternate alcoholic beverages with water or other non-alcoholic drinks.

Kidney and Liver Problems

Kidney and liver problems can disrupt the body’s fluid balance and lead to bloating and water retention. Kidney disease can impair the kidneys’ ability to filter waste and excess fluid from the body, while liver disease can affect the production of proteins that regulate fluid balance. If you suspect that kidney or liver problems are causing your bloating, it is essential to seek medical attention for a proper diagnosis and appropriate treatment.

Heart Failure

Heart failure occurs when the heart cannot pump enough blood to meet the body’s needs. This can lead to fluid retention and bloating, particularly in the legs, ankles, and abdomen. Bloating caused by heart failure is often accompanied by other symptoms such as shortness of breath, fatigue, and swelling in the extremities. If you suspect that heart failure is causing your bloating, it is crucial to seek immediate medical attention.

5 Common Causes of Bloating and How to Relieve It

Cyclic Gastrointestinal Disorders


Gastroparesis is a condition where the stomach muscles do not function properly, leading to delayed emptying of food from the stomach into the small intestine. This can cause bloating, nausea, vomiting, and feelings of fullness after eating. The exact cause of gastroparesis is often unknown, but it can be related to nerve damage, diabetes, or certain medications. Treatment options for gastroparesis range from dietary changes, such as eating smaller, more frequent meals, to medications that promote stomach emptying.

Colonic Inertia

Colonic inertia is a condition where the muscles of the colon do not contract properly, causing a delay or complete failure of stool to move through the digestive tract. This can result in bloating, constipation, and abdominal discomfort. Colonic inertia is often related to a dysfunction in the nerves that control the colon muscles. Treatment for colonic inertia may involve dietary changes, increased physical activity, medications, or in severe cases, surgery.

Functional Dyspepsia

Functional dyspepsia is a chronic disorder that affects the upper digestive tract, including the stomach and esophagus. It is characterized by recurring pain or discomfort in the upper abdomen, bloating, early satiety, and nausea. The exact cause of functional dyspepsia is unknown, but it is believed to be related to abnormalities in the way the stomach muscles and nerves function. Management of functional dyspepsia may involve medication to alleviate symptoms, dietary modifications, and stress reduction techniques.

Chronic Intestinal Pseudo-Obstruction

Chronic Intestinal Pseudo-Obstruction (CIPO) is a rare condition where the muscles of the digestive tract do not move food, gas, and stool through the intestines properly. This can lead to bloating, abdominal pain, nausea, and vomiting. CIPO can be caused by abnormalities in the nerves or muscles of the intestines. Treatment for CIPO typically focuses on managing symptoms through dietary changes, medications to improve motility, and in severe cases, surgery.

Cyclic Vomiting Syndrome

Cyclic Vomiting Syndrome (CVS) is a disorder characterized by episodes of severe vomiting that can last for hours or even days. It is often accompanied by nausea, abdominal pain, and bloating. The exact cause of CVS remains unknown, but it is believed to involve a dysfunction in the brain-gut axis. Treatment for CVS typically involves managing symptoms during episodes through medications to alleviate nausea, pain relief, and hydration.

Stress and Anxiety

Nervous Stomach

A “nervous stomach” refers to gastrointestinal symptoms that can occur in response to stress and anxiety. When you are stressed or anxious, your body releases hormones that can affect digestion and lead to symptoms such as bloating, abdominal pain, and changes in bowel movements. To manage bloating and other digestive symptoms related to stress and anxiety, it is important to practice stress-reducing techniques such as deep breathing, mindfulness, and regular exercise. Seeking professional help, such as therapy or counseling, may also be beneficial in managing stress and anxiety.

Fight-or-Flight Response

The fight-or-flight response is the body’s natural reaction to a perceived threat or stressor. During this response, the body releases stress hormones that can affect various bodily functions, including digestion. The fight-or-flight response can lead to a decreased blood flow to the digestive organs and a reduction in digestive secretions, which can cause bloating and other digestive symptoms. Managing stress through relaxation techniques, regular exercise, and self-care can help reduce the impact of the fight-or-flight response on digestion.

Stress-Induced Gut Dysfunction

Stress-induced gut dysfunction refers to the negative effects stress can have on the functioning of the gastrointestinal tract. Chronic or excessive stress can alter the balance of gut bacteria, increase intestinal permeability, and affect muscle contractions in the intestines, leading to symptoms such as bloating, abdominal pain, and changes in bowel movements. Managing stress through stress reduction techniques, healthy lifestyle habits, and seeking support from healthcare professionals can help alleviate stress-induced gut dysfunction.

Emotional Eating

Emotional eating is the practice of eating in response to emotions, such as stress, sadness, or boredom, rather than hunger. Emotional eating can lead to overeating, which can contribute to bloating and discomfort. Addressing the underlying emotions and finding alternative ways to cope with them, such as engaging in physical activity or practicing relaxation techniques, can help reduce emotional eating and the associated bloating.


Hyperventilation, or rapid breathing, can occur in response to stress or anxiety. When you hyperventilate, you take in too much oxygen and exhale too much carbon dioxide, which can lead to changes in the pH balance of the blood and affect digestion. Hyperventilation can cause symptoms such as bloating, belching, and a feeling of shortness of breath. Managing stress and anxiety through relaxation techniques, deep breathing exercises, and seeking support from healthcare professionals can help reduce hyperventilation-related bloating.

5 Common Causes of Bloating and How to Relieve It

Medications and Supplements


Antibiotics are medications used to treat bacterial infections. While they are necessary to fight infections, antibiotics can also disrupt the balance of bacteria in the gut, leading to digestive symptoms such as bloating, diarrhea, and abdominal pain. To minimize the risk of bloating from antibiotics, it is important to take them as prescribed and, if possible, take probiotics to help restore the balance of beneficial gut bacteria.

Non-Steroidal Anti-Inflammatory Drugs (NSAIDs)

Non-steroidal anti-inflammatory drugs (NSAIDs) are commonly used to relieve pain, reduce inflammation, and lower fever. However, regular or prolonged use of NSAIDs can irritate the lining of the stomach and intestines, leading to bloating, indigestion, and even stomach ulcers. To reduce the risk of bloating from NSAIDs, it is important to use them judiciously and follow the recommended dosages. If you experience persistent bloating or digestive discomfort while taking NSAIDs, it is important to consult a healthcare professional.

Proton Pump Inhibitors (PPIs)

Proton pump inhibitors (PPIs) are medications commonly used to reduce stomach acid production and treat conditions such as gastroesophageal reflux disease (GERD) and ulcers. While PPIs can be effective in managing these conditions, they can also disrupt the normal digestive process and lead to bloating and other digestive symptoms. To minimize the risk of bloating from PPIs, it is important to take them as prescribed and discuss any persistent symptoms with a healthcare professional.

Fiber Supplements

Fiber supplements are often used to promote regular bowel movements and alleviate constipation. While fiber is important for digestive health, excessive fiber intake or sudden increases in fiber intake can cause bloating and gas. To prevent bloating from fiber supplements, it is important to start with small doses and gradually increase the amount over time. It is also important to drink plenty of water to help the fiber move through the digestive system smoothly.

Iron Supplements

Iron supplements are commonly used to treat iron deficiency anemia. While they are essential for maintaining healthy blood cells, iron supplements can also cause digestive side effects such as bloating, constipation, and stomach pain. To minimize bloating from iron supplements, it is important to take them as prescribed and discuss any persistent symptoms with a healthcare professional. In some cases, switching to a different form of iron supplement or adjusting the dosage may be necessary.

Medical Conditions

Gastric Outlet Obstruction

Gastric outlet obstruction occurs when there is a blockage in the stomach that prevents the normal flow of food from the stomach into the small intestine. This obstruction can cause bloating, early satiety, vomiting, and weight loss. Gastric outlet obstruction can be caused by conditions such as stomach cancer, peptic ulcers, or scar tissue from previous surgeries. Treatment for gastric outlet obstruction may involve medications to reduce inflammation, surgical intervention to remove the blockage, or endoscopic procedures to open the blockage.

Gallbladder Disease

Gallbladder disease refers to conditions that affect the gallbladder, a small organ located beneath the liver that stores bile. Bloating and digestive discomfort, particularly after consuming fatty meals, are common symptoms of gallbladder disease. Conditions that can affect the gallbladder include gallstones, inflammation of the gallbladder (cholecystitis), or the presence of polyps. Treatment for gallbladder disease may involve dietary modifications, medications to dissolve gallstones, or in severe cases, surgical removal of the gallbladder.

Pancreatic Insufficiency

Pancreatic insufficiency occurs when the pancreas does not produce enough digestive enzymes to adequately digest food. The lack of these enzymes can lead to symptoms such as bloating, weight loss, fatty stools, and nutrient deficiencies. Pancreatic insufficiency can be caused by conditions such as chronic pancreatitis, cystic fibrosis, or pancreatic cancer. Treatment for pancreatic insufficiency usually involves the use of pancreatic enzyme supplements to aid digestion and maintain proper nutrition.

Liver Disease

Liver disease refers to various conditions that affect the liver, including hepatitis, fatty liver disease, and cirrhosis. Bloating, especially in the abdominal area, can be a common symptom of liver disease. Other symptoms may include jaundice (yellowing of the skin and eyes), fatigue, and changes in appetite. Treatment for liver disease depends on the underlying cause and severity of the condition and may involve lifestyle modifications, medication, or in severe cases, liver transplantation.

Intestinal Obstruction

Intestinal obstruction refers to a blockage in the intestines that prevents food, fluids, or gas from moving through the digestive tract. Bloating, severe abdominal pain, vomiting, and constipation are common symptoms of intestinal obstruction. Causes of intestinal obstruction may include hernias, tumors, scar tissue from previous surgeries, or conditions such as Crohn’s disease or diverticulitis. Treatment for intestinal obstruction often requires hospitalization and may involve surgery to remove the blockage or relieve the pressure.

In conclusion, bloating can be caused by various factors, including digestive disorders, food intolerances, excessive swallowing of air, overeating, hormonal changes, fluid imbalance, cyclic gastrointestinal disorders, stress and anxiety, medications and supplements, and certain medical conditions. Understanding the underlying causes of bloating can help individuals find the most appropriate strategies to manage and alleviate their symptoms. It is important to consult with a healthcare professional for an accurate diagnosis and tailored treatment plan. By adopting healthy lifestyle habits, making dietary modifications, and seeking appropriate medical care, individuals can find relief from bloating and improve their overall digestive health.

'); var maf_after_2nd_p_data = maf_decode_string(''); var maf_after_3rd_p_data = maf_decode_string(''); var maf_after_4th_p_data = maf_decode_string(''); var maf_after_5th_p_data = maf_decode_string(''); var maf_after_6th_p_data = maf_decode_string(''); var maf_after_7th_p_data = maf_decode_string(''); var maf_after_8th_p_data = maf_decode_string(''); var maf_after_9th_p_data = maf_decode_string(''); var maf_after_10th_p_data = maf_decode_string(''); var maf_after_every_p_data = maf_decode_string(''); var maf_after_last_p_data = maf_decode_string('\"\"'); } $(document).ready(function(){ if(maf_header_data.trim() !== ''){ $($('header')[0]).append(maf_header_data); } if(maf_below_header_data.trim() !== ''){ $($('header')[0]).after(maf_below_header_data); } if(maf_above_header_data.trim() !== ''){ $($('header')[0]).before(maf_above_header_data); } if(maf_footer_data.trim() !== ''){ $($('footer')[0]).append(maf_footer_data); } if(maf_after_footer_data.trim() !== ''){ $($('footer')[0]).after(maf_after_footer_data); } if(maf_above_footer_data.trim() !== ''){ $($('footer')[0]).before(maf_above_footer_data); } if(maf_above_post_title_data.trim() !== ''){ $($('.entry-title')[0]).before(maf_above_post_title_data); } if(maf_below_post_title_data.trim() !== ''){ $($('.entry-title')[0]).after(maf_below_post_title_data); } if(typeof $(all_p)[0] !== typeof undefined && maf_after_1st_p_data.trim() !== ''){ $($(all_p)[0]).append(maf_after_1st_p_data); } if(typeof $(all_p)[1] !== typeof undefined && maf_after_2nd_p_data.trim() !== ''){ $($(all_p)[1]).append(maf_after_2nd_p_data); } if(typeof $(all_p)[2] !== typeof undefined && maf_after_3rd_p_data.trim() !== ''){ $($(all_p)[2]).append(maf_after_3rd_p_data); } if(typeof $(all_p)[3] !== typeof undefined && maf_after_4th_p_data.trim() !== ''){ $($(all_p)[3]).append(maf_after_4th_p_data); } if(typeof $(all_p)[4] !== typeof undefined && maf_after_5th_p_data.trim() !== ''){ $($(all_p)[4]).append(maf_after_5th_p_data); } if(typeof $(all_p)[5] !== typeof undefined && maf_after_6th_p_data.trim() !== ''){ $($(all_p)[5]).append(maf_after_6th_p_data); } if(typeof $(all_p)[6] !== typeof undefined && maf_after_7th_p_data.trim() !== ''){ $($(all_p)[6]).append(maf_after_7th_p_data); } if(typeof $(all_p)[7] !== typeof undefined && maf_after_8th_p_data.trim() !== ''){ $($(all_p)[7]).append(maf_after_8th_p_data); } if(typeof $(all_p)[8] !== typeof undefined && maf_after_9th_p_data.trim() !== ''){ $($(all_p)[8]).append(maf_after_9th_p_data); } if(typeof $(all_p)[9] !== typeof undefined && maf_after_10th_p_data.trim() !== ''){ $($(all_p)[9]).append(maf_after_10th_p_data); } $(all_p).each(function(i,v){ if(maf_after_every_p_data.trim() !== ''){ $(v).append(maf_after_every_p_data); } }); if(typeof $(all_p).last() !== typeof undefined && typeof maf_after_last_p_data !== typeof undefined && maf_after_last_p_data.trim() !== ''){ $($(all_p).last()[0]).append(maf_after_last_p_data); } }); function maf_decode_string(str){ str = str.replace('\'',"'"); str = str.replace('\"','"'); return str; }