SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2004
    Location
    york
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Boostrap: Filtering Results in Tabbed Content

    Hi,

    I'm building a site with PHP and bootstrap and trying to find a way to filter results without breaking the tabbed content.

    At the moment, I have three tabs with unique ids like #tab1 #tab2 etc.

    On one of the tabs, I'd like to offer the option of filtering results so would like to have a list of options to reload the tabbed content but with additional get variables so that the links would be href=#tab1?filter_id=1 but not surprisingly that is breaking the jquery.

    If anyone has any ideas for how I should approach this, it would be much appreciated.

    Many thanks in advance.

  2. #2
    Community Advisor bronze trophy
    fretburner's Avatar
    Join Date
    Apr 2013
    Location
    Brazil
    Posts
    1,410
    Mentioned
    45 Post(s)
    Tagged
    12 Thread(s)
    Hi arthurnegas,

    Query string values have to go before the fragment (the #tab1 part) otherwise they won't be sent to the server by the browser. Your href value should be ?filter_id=1#tab1

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2004
    Location
    york
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Fretburner,

    You're a star. Was contemplating starting a very unwelcome plan B tomorrow. Have tested and that works a treat.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •