Jquery-please explain code

I was researching how to stay in same tab after click  on my code behind button and I came across these 2 possible solutions but
implementing causes a javascript runtime error
'Object expected'

1)          $($respTabs.find('.resp-tab-item.' + options.tabidentify)[tabNum]).addClass('resp-tab-                     active').css({
                'background-color': options.activetab_bg,
                'border-color': options.active_border_color

Open in new window

        $(document).ready(function () {
            $("#HorizontalTab").bind('tabsselect', function (event, ui) {
                window.location.href = ui.tab;

Open in new window

These are jquery codes and maybe the jquery and javaScript experts can help read and implement these correctly what it does. Thanks
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
The first set searches through whatever has been loaded into $respTabs for an element with class
.resp-tab-item.' + options.tabidentify)
This returns an array so the [tabNum] specifies which of the returned elements you are interested in.
To this the class resp-tab-active is added and the CSS background colour and border colour for the selected element are changed

In the second snippet you are binding an event handler to the tabsselect event issued within the element with id #HorizontalTab - and changing the URL of the active window to the tab value passed into the event.

So the first one finds a tab and changes its border and background colour
The second sets the url of the active window to a specified value.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
zachvaldezAuthor Commented:
Thanks! I really need to understand and need to break down further details of it and am confident you can be of tremendous help and thanks more on your patience in advance.
In the example I showed you $respTabs is the  control is?
Julian HansenCommented:
I am not sure of what you are asking?
zachvaldezAuthor Commented:
I'm not sure what's $RespTabs is if it is the control object.
Julian HansenCommented:
You have only provided a small bit of code - in order to answer that question we would need to see where it is defined.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.