2A News

Hero Wife Not Charged in Deadly Defense of Husband

Reading Time: 1:59 min

The Massachusetts woman who may have saved her husband’s life after a social media dispute went horribly wrong will not face charges in the fatal shooting earlier this month. The…

View post

NJ Officials Reveal Date for AR-15 and Magazine Ruling to Take Effect

Reading Time: 1:56 min

New Jersey’s shooting community has a significant day coming at the end of the month. That’s when the Third Circuit’s decision in Association of New Jersey Rifle and Pistol Clubs…

View post

Armed Good Neighbor Saves Two Women from Alleged Attacker

Reading Time: 2:3 min

That thing that anti-gunners tell the rest of us never happens is, in truth, about as predictable as the sunrise.  In a Phoenix apartment complex on Sunday, yet another good…

View post

Armed Diner Stops Knife-Wielding Suspect in Restaurant

Reading Time: 2:3 min

A California man awaits an official decision on whether he faces trouble for stepping up with a firearm and stopping an obviously disturbed individual allegedly terrorizing customers and staff in…

View post

Fifth Circuit to Consider Whether Commerce Clause Allows Feds to Control Firearms

Reading Time: 2:6 min

Momentum is a thing, as any ardent sports fan will confirm. As for Second Amendment rights, there is no denying that courts recently have examined new firearm-related laws and rulings…

View post

Mom Allegedly Catches Man Under 13-Year-Old’s Bed, Charged with Murder

Reading Time: 4:12 min

As cautionary tales go, the ordeal a Memphis mother faces after shooting an adult suspect she allegedly found under her young daughter’s bed should be a warning for every law-abiding…

View post
<script>
  /*Source: https://github.com/Krzysztof-Antosik/Two-direction-Sticky-Sidebar*/
  
  // Verificar el ancho de pantalla al cargar y redimensionar
  function checkScreenWidth() {
    if (window.innerWidth <= 767) {
      // Si la pantalla es menor o igual a 676px, no ejecutar el código
      return;
    }

    const stickyElement = document.querySelector('.fb-sidebar__aside');
    const startPosition = stickyElement.getBoundingClientRect().top;

    let endScroll = window.innerHeight - stickyElement.offsetHeight - 500;
    let currPos = window.scrollY;
    let screenHeight = window.innerHeight;
    let stickyElementHeight = stickyElement.offsetHeight;
    let topGap = 40;
    let bottomGap = 40;

    setTimeout(() => {
      if (stickyElement.hasAttribute('data-top-gap')) {
        const dataTopGap = stickyElement.getAttribute('data-top-gap');
        topGap = dataTopGap === 'auto' ? startPosition : parseInt(dataTopGap);
      }

      if (stickyElement.hasAttribute('data-bottom-gap')) {
        bottomGap = parseInt(stickyElement.getAttribute('data-bottom-gap'));
      }
    }, 100);

    stickyElement.style.position = 'sticky';
    stickyElement.style.top = `${topGap}px`;
    stickyElement.style.height = 'fit-content';

    function positionStickySidebar() {
      endScroll = window.innerHeight - stickyElement.offsetHeight - bottomGap;
      const stickyElementTop = parseInt(stickyElement.style.top.replace('px', ''));

      if (stickyElementHeight + topGap + bottomGap > screenHeight) {
        if (window.scrollY < currPos) {
          if (stickyElementTop < topGap) {
            stickyElement.style.top = `${stickyElementTop + currPos - window.scrollY}px`;
          } else if (stickyElementTop >= topGap && stickyElementTop !== topGap) {
            stickyElement.style.top = `${topGap}px`;
          }
        } else {
          if (stickyElementTop > endScroll) {
            stickyElement.style.top = `${stickyElementTop + currPos - window.scrollY}px`;
          } else if (stickyElementTop < endScroll && stickyElementTop !== endScroll) {
            stickyElement.style.top = `${endScroll}px`;
          }
        }
      } else {
        stickyElement.style.top = `${topGap}px`;
      }
      currPos = window.scrollY;
    }

    function stickyElementToMe() {
      stickyElement.style.top = `${topGap}px`;
    }

    function updateSticky() {
      screenHeight = window.innerHeight;
      stickyElementHeight = stickyElement.offsetHeight;
      positionStickySidebar();
    }

    setTimeout(() => {
      window.addEventListener('resize', () => {
        currPos = window.scrollY;
        updateSticky();
      });

      document.addEventListener('scroll', updateSticky, {
        capture: true,
        passive: true
      });
    }, 1000);
  }

  // Verificar el ancho de pantalla al cargar y redimensionar
  window.addEventListener('load', checkScreenWidth);
  window.addEventListener('resize', checkScreenWidth);
</script>