Jquery with CI |
[eluser]uahmed[/eluser]
Hi I want to play with jquery with CI . I have one page in which i want to hide some div on load . I putt the code of hide but it didnt work . Here is my code Code: <html>
[eluser]Otemu[/eluser]
Change Code: ("all_name").hide(); Code: ("#all_name").hide(); Also view your console in your browser and see if there any errors coming up, make sure that the path to your JQuery library is correct.
[eluser]InsiteFX[/eluser]
If you want to show javascript tags in your code you need to change the s in the tags to a $.
[eluser]uahmed[/eluser]
[quote author="Otemu" date="1364208251"] Code: ("#all_name").hide(); Also view your console in your browser and see if there any errors coming up, make sure that the path to your JQuery library is correct.[/quote] still it didnt work and i am calling jquery from google link
[eluser]TheFuzzy0ne[/eluser]
If you use Firefox, you can install the Firebug addon, which will help you spot any errors and allow you to see any network activity. It's also wise to [url="validator.w3.org/"]validate[/url] your HTML. You're missing the <body> tags, which probably won't help...
[eluser]uahmed[/eluser]
hi thanks for the reply , yes i am missing the body tag i was thinking to make it work than making the rest of html . I have firebug installed and shows me no error . Any good toutorial link of using Jquery with CI ? Thanks
[eluser]TheFuzzy0ne[/eluser]
It doesn't matter which framework you use - JQuery is JQuery, well it is in the context you're using it. It's just manipulating the page. It's not making any AJAX requests. You'd be better of creating a valid HTML page to start, and then using JQuery to manipulate the page. Would you put a nice new engine into a car that was falling apart and expect the car to run without any problems? The underlying structure can make all the difference. There are plenty of decent tutorials about: http://lmgtfy.com/?q=jquery+tutorial |
Welcome Guest, Not a member yet? Register Sign In |